当前位置: 首页>>代码示例>>C#>>正文


C# Category.GetColumn方法代码示例

本文整理汇总了C#中Category.GetColumn方法的典型用法代码示例。如果您正苦于以下问题:C# Category.GetColumn方法的具体用法?C# Category.GetColumn怎么用?C# Category.GetColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Category的用法示例。


在下文中一共展示了Category.GetColumn方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Category cat = new Category();
         cat.Where.CategoryID.Value = CategoryID;
         if (cat.Query.Load())
         {
             lblName.Text = cat.GetColumn("Name" + Utils.LangPrefix).ToString();
             if (!cat.IsColumnNull("CategoryContent" + Utils.LangPrefix))
             {
                 lblCategoryContent.Text = cat.GetColumn("CategoryContent" + Utils.LangPrefix).ToString();
             }
         }
     }
 }
开发者ID:ivladyka,项目名称:YourTravel,代码行数:16,代码来源:CategoryView.aspx.cs

示例2: LoadTitle

 private void LoadTitle()
 {
     Category c = new Category();
     if (c.LoadByPrimaryKey(CategoryID))
     {
         string title = "";
         if (!c.IsColumnNull("Title" + Utils.LangPrefix))
         {
             title = c.GetColumn("Title" + Utils.LangPrefix).ToString();
         }
         if (title.Trim() == "")
         {
             title = c.GetColumn("Name" + Utils.LangPrefix).ToString();
         }
         this.m_Name = title;
     }
 }
开发者ID:ivladyka,项目名称:Ekran,代码行数:17,代码来源:GalleryTableView.ascx.cs

示例3: LoadTitle

 private void LoadTitle()
 {
     Category c = new Category();
     if (c.LoadByPrimaryKey(CategoryID))
     {
         this.m_Name = c.GetColumn("Name" + Utils.LangPrefix).ToString(); ;
         lblTitle.Text = this.m_Name;
     }
 }
开发者ID:ivladyka,项目名称:Ekran,代码行数:9,代码来源:GalleryPhotoView.ascx.cs

示例4: LoadCategories

 private void LoadCategories()
 {
     const int countCells = 2;
     HtmlTableRow row = new HtmlTableRow();
     Category c = new Category();
     //c.Where.IsGallery.Value = true;
     if(c.Query.Load())
     {
         do
         {
             string title = "";
             if (!c.IsColumnNull("Title" + Utils.LangPrefix))
             {
                 title = c.GetColumn("Title" + Utils.LangPrefix).ToString();
             }
             if (title.Trim() == "")
             {
                 title = c.GetColumn("Name" + Utils.LangPrefix).ToString();
             }
             if (row.Cells.Count < countCells)
             {
                 row.Cells.Add(AddCategoryCellInnerHTML(c.CategoryID, title));
             }
             else
             {
                 tblCategory.Rows.Add(row);
                 row = new HtmlTableRow();
                 row.Cells.Add(AddCategoryCellInnerHTML(c.CategoryID, title));
             }
         } while (c.MoveNext());
     }
     for (int i = row.Cells.Count; i < countCells; i++)
     {
         row.Cells.Add(AddTableCell("&nbsp;"));
     }
     tblCategory.Rows.Add(row);
 }
开发者ID:ivladyka,项目名称:Ekran,代码行数:37,代码来源:GalleryTableList.ascx.cs

示例5: LoadCommonPageData

 private void LoadCommonPageData()
 {
     Settings s = new Settings();
     if (s.LoadByPrimaryKey(1))
     {
         Category c = new Category();
         if (c.LoadByPrimaryKey(CategoryID))
         {
             if (!c.IsColumnNull("Keywords" + Utils.LangPrefix))
             {
                 m_Keywords = c.GetColumn("Keywords" + Utils.LangPrefix).ToString();
             }
             if (!c.IsColumnNull("Description" + Utils.LangPrefix))
             {
                 m_Description = c.GetColumn("Description" + Utils.LangPrefix).ToString();
             }
         }
         if (m_Keywords.TrimEnd().Length == 0 && !s.IsColumnNull("Keywords" + Utils.LangPrefix))
         {
             m_Keywords = s.GetColumn("Keywords" + Utils.LangPrefix).ToString();
         }
         if (m_Description.TrimEnd().Length == 0 && !s.IsColumnNull("Description" + Utils.LangPrefix))
         {
             m_Description = s.GetColumn("Description" + Utils.LangPrefix).ToString();
         }
         if (m_Keywords.TrimEnd().Length == 0)
         {
             m_Keywords = Resources.Vikkisoft.MetaKeywords;
         }
         if (m_Description.TrimEnd().Length == 0)
         {
             m_Description = Resources.Vikkisoft.MetaDescription;
         }
     }
 }
开发者ID:ivladyka,项目名称:Ekran,代码行数:35,代码来源:DefaultMP.master.cs

示例6: SetPageName

 private void SetPageName()
 {
     Category c = new Category();
     c.Where.CategoryID.Value = CategoryID;
     if (c.Query.Load())
     {
         this.m_Name = c.GetColumn("Name").ToString();
     }
 }
开发者ID:ivladyka,项目名称:Ekran,代码行数:9,代码来源:CategoryEdit.ascx.cs

示例7: InitMenu

    public static void InitMenu(Menu menu, bool onlyTopLevel, bool ukr, bool adminMenu)
    {
        Hashtable catTitles = new Hashtable();
        Hashtable catTitlesEng = new Hashtable();
        Category cat = new Category();
        if (cat.LoadAll())
        {
            do
            {
                catTitles.Add(cat.CategoryID, cat.GetColumn("Name" + (ukr ? "" : LangPrefix)).ToString().ToUpper());
                catTitlesEng.Add(cat.CategoryID, cat.GetColumn("Name_en").ToString().ToUpper());
            } while (cat.MoveNext());
        }

        menu.Items.Clear();
        if (adminMenu)
        {
            menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 1, catTitles, catTitlesEng, adminMenu));
        }
        menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 2, catTitles, catTitlesEng, adminMenu));
        if (!onlyTopLevel)
        {
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 28, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 3, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 5, catTitles, catTitlesEng, adminMenu));
        }
        menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 7, catTitles, catTitlesEng, adminMenu));
        if (!onlyTopLevel)
        {
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 8, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 9, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 10, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 11, catTitles, catTitlesEng, adminMenu));
        }
        menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 12, catTitles, catTitlesEng, adminMenu));
        if (!onlyTopLevel)
        {
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 13, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 14, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 15, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 16, catTitles, catTitlesEng, adminMenu));
        }
        menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 18, catTitles, catTitlesEng, adminMenu));
        if (!onlyTopLevel)
        {
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 19, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 20, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 21, catTitles, catTitlesEng, adminMenu));
        }
        menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 22, catTitles, catTitlesEng, adminMenu));
        if (!onlyTopLevel)
        {

            menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 23, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 24, catTitles, catTitlesEng, adminMenu));
            menu.Items[menu.Items.Count - 1].ChildItems.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 25, catTitles, catTitlesEng, adminMenu));
        }
        else
        {
            menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 24, catTitles, catTitlesEng, adminMenu));
            menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 25, catTitles, catTitlesEng, adminMenu));
        }
        menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=CategoryEdit", 27, catTitles, catTitlesEng, adminMenu));
        if (adminMenu)
        {
            menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=RoomList", "НОМЕРИ"));
            menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=RoomCategoryList", "КАТЕГОРІЇ НОМЕРІВ"));
            menu.Items.Add(AddMenuItem("~/Office/Office.aspx?content=SettingsEdit&SettingID=1", "НАЛАШТУВАННЯ"));
        }
    }
开发者ID:ivladyka,项目名称:Ekran,代码行数:70,代码来源:Utils.cs

示例8: ShowChildCategories

 private void ShowChildCategories()
 {
     if (CategoryID > 1)
     {
         Menu menu = ((MasterPageBase)Page.Master).TopMenuControl;
         foreach (MenuItem item in menu.Items)
         {
             if (item.NavigateUrl.IndexOf("/hotel-" + CategoryID + "/") >= 0
                 || item.NavigateUrl.IndexOf("&CategoryID=" + CategoryID) >= 0)
             {
                 if (item.ChildItems.Count > 0)
                 {
                     pnlChildCategories.Visible = true;
                     foreach (MenuItem childItem in item.ChildItems)
                     {
                         int childCategoryID = int.Parse(childItem.Value);
                         Gallery g = new Gallery();
                         if (g.LoadCoverByCategoryID(childCategoryID))
                         {
                             if (g.s_PhotoName.Length > 0)
                             {
                                 HtmlGenericControl li = new HtmlGenericControl("li");
                                 HtmlGenericControl divTitle = new HtmlGenericControl("div");
                                 divTitle.Attributes["class"] = "subpagetitle";
                                 HtmlGenericControl h4 = new HtmlGenericControl("h4");
                                 Category c = new Category();
                                 if (c.LoadByPrimaryKey(childCategoryID))
                                 {
                                     h4.InnerHtml = c.GetColumn("Name" + Utils.LangPrefix).ToString(); ;
                                 }
                                 divTitle.Controls.Add(h4);
                                 HyperLink hl = new HyperLink();
                                 hl.NavigateUrl = childItem.NavigateUrl;
                                 System.Web.UI.WebControls.Image image = new System.Web.UI.WebControls.Image();
                                 if (item.ChildItems.Count == 4)
                                 {
                                     image.Width = Unit.Pixel(180);
                                 }
                                 else
                                 {
                                     image.Width = Unit.Pixel(180);
                                 }
                                 image.ImageUrl = Path.Combine(Utils.GaleryImagePath, g.s_PhotoName.Substring(0, g.s_PhotoName.ToString().Length - 4) + "_s.jpg");
                                 hl.Controls.Add(image);
                                 hl.Controls.Add(divTitle);
                                 li.Controls.Add(hl);
                                 /*if (g.GetColumn("PriceRange").ToString().Length > 0)
                                 {
                                     HtmlGenericControl div = new HtmlGenericControl("div");
                                     div.InnerHtml = g.GetColumn("PriceRange").ToString() + " " + Resources.Vikkisoft.Grn;
                                     if (item.ChildItems.Count == 4)
                                     {
                                         div.Style["width"] = "150px";
                                         div.Style["padding"] = "0";
                                         div.Style["margin"] = "0";
                                     }
                                     li.Controls.Add(div);
                                 }*/
                                 ulChildCategories.Controls.Add(li);
                             }
                         }
                     }
                 }
                 return;
             }
         }
     }
 }
开发者ID:ivladyka,项目名称:Ekran,代码行数:68,代码来源:CategoryView.ascx.cs

示例9: LoadCategory

 private void LoadCategory()
 {
     Category c = new Category();
     c.Where.CategoryID.Value = CategoryID;
     if (c.Query.Load())
     {
         if (CategoryID > 1)
         {
             lblName.Text = c.GetColumn("Name" + Utils.LangPrefix).ToString();
         }
         this.m_Name = c.GetColumn("Name" + Utils.LangPrefix).ToString();
         if (!c.IsColumnNull("CategoryContent" + Utils.LangPrefix))
         {
             lblCategoryContent.Text = c.GetColumn("CategoryContent" + Utils.LangPrefix).ToString();
         }
         if (!c.IsColumnNull(Category.ColumnNames.RoomCategoryID))
         {
             LoadRoomPrice(c.RoomCategoryID);
         }
     }
 }
开发者ID:ivladyka,项目名称:Ekran,代码行数:21,代码来源:CategoryView.ascx.cs


注:本文中的Category.GetColumn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。