當前位置: 首頁>>代碼示例>>C#>>正文


C# ActivityType.GetType方法代碼示例

本文整理匯總了C#中ActivityType.GetType方法的典型用法代碼示例。如果您正苦於以下問題:C# ActivityType.GetType方法的具體用法?C# ActivityType.GetType怎麽用?C# ActivityType.GetType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ActivityType的用法示例。


在下文中一共展示了ActivityType.GetType方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: LoadActivityInf

        public void LoadActivityInf(int id)
        {
            #region 加載活動信息

            ActivityInfo actInfo = Activities.GetActivityInfo(id);
            act_title.Text = actInfo.Atitle;
            postdatetimeStart.SelectedDate = Convert.ToDateTime(actInfo.Begintime);
            postdatetimeEnd.SelectedDate = Convert.ToDateTime(actInfo.Endtime);
            act_style.Text = actInfo.Stylecode;
            act_script.Text = actInfo.Scriptcode;
            templatenew.Text = actInfo.Desccode;
            seotitle.Text = actInfo.Seotitle;
            seokeyword.Text = actInfo.Seokeyword;
            seodesc.Text = actInfo.Seodesc;
            act_status.SelectedValue = actInfo.Enabled.ToString();
            act_rssimg.Text = actInfo.RssImg;

            ActivityType ate = new ActivityType();
            typeid.Items.Clear();
            typeid.Items.Add(new ListItem("全部", "0"));
            foreach (string atname in Enum.GetNames(ate.GetType()))
            {
                int s_value = Convert.ToInt16(Enum.Parse(ate.GetType(), atname));
                string s_text = EnumCatch.GetActivityType(s_value);
                typeid.Items.Add(new ListItem(s_text, s_value.ToString()));
            }
            typeid.SelectedValue = actInfo.Atype.ToString();

            #endregion
        }
開發者ID:yeyong,項目名稱:manageserver,代碼行數:30,代碼來源:global_editactivity.aspx.cs

示例2: InitializeComponent

 private void InitializeComponent()
 {
     this.SaveSearchCondition.Click += new EventHandler(this.SaveSearchCondition_Click);
     ActivityType ate = new ActivityType();
     typeid.Items.Clear();
     typeid.Items.Add(new ListItem("全部", "0"));
     foreach (string atname in Enum.GetNames(ate.GetType()))
     {
         int s_value = Convert.ToInt16(Enum.Parse(ate.GetType(), atname));
         string s_text = EnumCatch.GetActivityType(s_value);
         typeid.Items.Add(new ListItem(s_text, s_value.ToString()));
     }
 }
開發者ID:yeyong,項目名稱:manageserver,代碼行數:13,代碼來源:global_searchactivity.aspx.cs

示例3: InitializeComponent

        private void InitializeComponent()
        {
            DataGrid1.TableHeaderName = "活動專題列表";
            DataGrid1.ColumnSpan = 11;
            DataGrid1.DataKeyField = "id";
            SetActInfo.Click += new EventHandler(SetActInfo_Click);

            ActivityType ate = new ActivityType();
            typeid.Items.Clear();
            typeid.Items.Add(new ListItem("全部", "0"));
            foreach (string atname in Enum.GetNames(ate.GetType()))
            {
                int s_value = Convert.ToInt16(Enum.Parse(ate.GetType(), atname));
                string s_text = EnumCatch.GetActivityType(s_value);
                typeid.Items.Add(new ListItem(s_text, s_value.ToString()));
            }
        }
開發者ID:yeyong,項目名稱:manageserver,代碼行數:17,代碼來源:global_activitygrid.aspx.cs

示例4: LoadActivityTree

        public void LoadActivityTree()
        {
            //讀取論壇版塊樹
            DataTable dt = AdminActivities.GetEnableActivities();

            if (dt.Rows.Count == 0) Server.Transfer("../global/global_addactivity.aspx"); //如果版塊表中沒有任何版塊, 則跳轉到"添加第一個版塊"頁麵.

            ViewState["dt"] = dt;

            sb.Append("<table border=\"0\"  width=\"100%\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\">");

            int advid = SASRequest.GetInt("id", 0);
            AnnouncementInfo ad_dt = Announcements.GetAnnouncement(advid);

            if (ad_dt != null && !string.IsNullOrEmpty(ad_dt.Relateactive))
            {
                this.SelectForumStr = "," + ad_dt.Relateactive + ",";
            }

            ActivityType ate = new ActivityType();
            int n = 0;
            int atlength = Enum.GetNames(ate.GetType()).Length;
            foreach (string atname in Enum.GetNames(ate.GetType()))
            {
                int s_value = Convert.ToInt16(Enum.Parse(ate.GetType(), atname));
                string s_text = EnumCatch.GetActivityType(s_value);
                string mystr = "";
                string currentnodestr = "";
                if ((n >= 0) && (n < (atlength - 1)))
                {
                    mystr += T_rootpic;
                    currentnodestr = I_nodepic;
                }
                else
                {
                    mystr += L_rootpic;
                    currentnodestr = No_nodepic;
                }
                sb.Append("<tr><td class=treetd> " + mystr + "<img src=../images/folders.gif class=treeimg > " + s_text + "</td></tr>");
                AddAdsTree(dt.Select("[atype] = " + s_value), currentnodestr);
                n++;
            }

            sb.Append("</table>");

            TreeContent.Text = sb.ToString();
        }
開發者ID:yeyong,項目名稱:manageserver,代碼行數:47,代碼來源:activetree.ascx.cs


注:本文中的ActivityType.GetType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。