예제 #1
0
 private void InitializeComponent()
 {
     this.SaveSearchCondition.Click += new EventHandler(this.SaveSearchCondition_Click);
     AdType thetype = new AdType();
     typeid.Items.Clear();
     typeid.Items.Add(new ListItem("全部", "0"));
     foreach (string atname in Enum.GetNames(thetype.GetType()))
     {
         string thetext = EnumCatch.GetADTpyeName(Convert.ToInt16(Enum.Parse(thetype.GetType(), atname)));
         string thevalue = Convert.ToInt16(Enum.Parse(thetype.GetType(), atname)).ToString();
         typeid.Items.Add(new ListItem(thetext, thevalue.ToString()));
     }
 }
예제 #2
0
        private void InitializeComponent()
        {
            this.type.SelectedIndexChanged += new EventHandler(this.type_SelectedIndexChanged);
            this.AddAdInfo.Click += new EventHandler(this.AddAdInfo_Click);

            #region 控件数据绑定

            starttime.SelectedDate = DateTime.Now;
            endtime.SelectedDate = DateTime.Now.AddDays(7);

            title.AddAttributes("maxlength", "40");
            title.AddAttributes("size", "40");

            //加载树
             AdType thetype = new AdType();
            //加载树
            type.Items.Clear();
            foreach (string tts in Enum.GetNames(thetype.GetType()))
            {
                string thetext = EnumCatch.GetADTpyeName(Convert.ToInt16(Enum.Parse(thetype.GetType(), tts)));
                string thevalue = Convert.ToInt16(Enum.Parse(thetype.GetType(), tts)).ToString();
                type.Items.Add(new ListItem(thetext, thevalue));
            }
            type.Attributes.Add("onChange", "showadhint();");
            type.SelectedIndex = 0;

            parameters.Items.Clear();
            parameters.Items.Add(new ListItem("代码", "htmlcode"));
            parameters.Items.Add(new ListItem("文字", "word"));
            parameters.Items.Add(new ListItem("图片", "image"));
            parameters.Items.Add(new ListItem("flash", "flash"));
            parameters.Attributes.Add("onChange", "showparameters();");
            parameters.SelectedIndex = 0;

            #endregion
        }
예제 #3
0
        private void InitializeComponent()
        {
            this.type.SelectedIndexChanged += new EventHandler(this.type_SelectedIndexChanged);

            this.UpdateADInfo.Click += new EventHandler(this.UpdateADInfo_Click);
            this.DeleteADInfo.Click += new EventHandler(this.DeleteADInfo_Click);

            title.AddAttributes("maxlength", "40");
            title.AddAttributes("size", "40");
            AdType thetype = new AdType();
            //加载树
            type.Items.Clear();
            type.Items.Add(new ListItem("请选择     ", "-1"));
            foreach (string tts in Enum.GetNames(thetype.GetType()))
            {
                string thetext = EnumCatch.GetADTpyeName(Convert.ToInt16(Enum.Parse(thetype.GetType(), tts)));
                string thevalue = Convert.ToInt16(Enum.Parse(thetype.GetType(), tts)).ToString();
                type.Items.Add(new ListItem(thetext, thevalue));
            }

            type.Attributes.Add("onChange", "showadhint();");

            if (SASRequest.GetString("advid") == "")
            {
                Response.Redirect("advertisementsgrid.aspx");
            }
            else
            {
                LoadAnnounceInf(SASRequest.GetInt("advid", -1));
            }
        }