protected void dplSecondClum_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.dplThirdClum.Items.Clear();
            List <ThirdClassDm> thirdlist  = new List <ThirdClassDm>();
            SecondClassDm       secondclum = new SecondClassDm();

            secondclum.SecondClassDmName = dplSecondClum.SelectedItem.Text;
            ThirdClassDm thirdclum = new ThirdClassDm();

            thirdlist = SecondClassDm.FcShowContent(thirdclum, secondclum);
            for (int i = 0; i < thirdlist.Count; i++)
            {
                this.dplThirdClum.Items.Add(new ListItem(thirdlist[i].ThirdClassDmName, i.ToString()));
            }
            this.dplThirdClum.Items.Insert(0, new ListItem("选择三级类目"));
        }
Beispiel #2
0
 protected void Delete2_Click(object sender, EventArgs e)
 {
     try
     {
         if (dlistSecondClumName.SelectedItem.Value == "")
         {
             this.lblCheck.Text = "选择删除项为空";
         }
         else
         {
             SecondClassDm Second = new SecondClassDm();
             ThirdClassDm  Third  = new ThirdClassDm();
             Second.SecondClassDmName = dlistSecondClumName.SelectedItem.Text;
             GA           ga = new GA();
             GAController GA = new GAController();
             if (SecondClassDm.FcShowContent(Third, Second).Count != 0)
             {
                 this.lblCheck.Text = "三级类目存在内容!";
                 //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + "三级类目存在内容" + "');</script>");
             }
             else
             {
                 if (GA.DeleteSecondClass(ga, Second))
                 {
                     this.lblCheck.Text = "删除成功!";
                     //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + "删除成功" + "');</script>");
                 }
                 else
                 {
                     this.lblCheck.Text = "删除失败!";
                     //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + "删除失败 " + "');</script>");
                 }
             }
         }
     }
     catch
     {
         this.lblCheck.Text = "选择删除项为空";
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            str = Request.QueryString["SecondName"];
            SecondClassDm secondclassdm = new SecondClassDm();

            secondclassdm.SecondClassDmName = str;
            ThirdClassDm thirdclassdm = new ThirdClassDm();

            this.DataList1.DataSource = SecondClassDm.FcShowContent(thirdclassdm, secondclassdm);
            this.DataList1.DataBind();
            GA   gAdmin = new GA();
            Good lGood  = new Good();

            lGood.SecondClassDmID = gAdmin.ScNameGetID(secondclassdm);
            List <Good> lGoodList = new List <Good>();

            lGoodList = Good.ScIDGetGoodID(lGood);
            List <ImgInfo> lImgInfo = new List <ImgInfo>();

            datalist_good.DataSource = ImgInfo.GoodIDGetImgInfo(lGoodList);
            datalist_good.DataBind();
        }