当前位置: 首页>>代码示例>>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;未经允许,请勿转载。