Пример #1
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Edit")
        {
            f_id.Text = e.CommandArgument.ToString();
        }

        if (e.CommandName == "Delete")
        {
            int         f_id   = Convert.ToInt32(e.CommandArgument);
            BLL.procate myb    = new BLL.procate();
            int         result = myb.num(f_id);
            if (result > 0)
            {
                msg("先把含有此父类的子类删除,才能删除父类");
            }
            else

            {
                BLL.fathercate f_b = new BLL.fathercate();
                int            rs  = f_b.delete(f_id);
                if (rs > 0)
                {
                    msg("删除成功");
                    bing();
                }
                else
                {
                    msg("删除失败");
                }
            }
        }
    }
Пример #2
0
 protected void qued_Click(object sender, EventArgs e)
 {
     if (f_id.Text != "未选择")
     {
         if (TextBox1.Text != "")
         {
             Model.fathercate mym = new Model.fathercate();
             mym.fathercateid = Convert.ToInt32(f_id.Text);
             mym.fathername   = TextBox1.Text;
             BLL.fathercate myb    = new BLL.fathercate();
             int            result = myb.update(mym);
             if (result > 0)
             {
                 msg("更改成功!");
                 TextBox1.Text = "";
                 f_id.Text     = "未选择";
                 bing();
             }
         }
         else
         {
             msg("类明不能为空");
         }
     }
     else
     {
         msg("未选择");
     }
 }
Пример #3
0
    public void loadCate()
    {
        Page.Title = "NET SHOPPING";

        HtmlMeta myMeta = new HtmlMeta();

        myMeta.Name    = "Keywords";
        myMeta.Content = "NET SHOPPING";
        this.Header.Controls.Add(myMeta);

        HtmlMeta myMeta1 = new HtmlMeta();

        myMeta1.Name    = "Description";
        myMeta1.Content = "NET SHOPPING";
        this.Header.Controls.Add(myMeta1);



        HtmlMeta myMeta2 = new HtmlMeta();

        myMeta2.Name    = "Author";
        myMeta2.Content = "NO.1 group";
        this.Header.Controls.Add(myMeta2);


        BLL.fathercate my_f = new BLL.fathercate();
        DataSet        ds_f = my_f.dataset();

        Repeater1.DataSource = ds_f.Tables[0];
        Repeater1.DataBind();
    }
Пример #4
0
    public void bing()
    {
        BLL.fathercate myb = new BLL.fathercate();
        DataSet        ds  = myb.dataset();

        GridView1.DataSource = ds.Tables[0];
        GridView1.DataBind();
    }
Пример #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         BLL.fathercate myb = new BLL.fathercate();
         DataSet        ds  = myb.dataset();
         fathername.DataSource = ds.Tables[0];
         fathername.DataBind();
     }
 }
Пример #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        BLL.fathercate my_f = new BLL.fathercate();
        DataSet        ds_f = my_f.dataset();

        Repeater1.DataSource = ds_f.Tables[0];
        Repeater1.DataBind();
        s_cateid();
        sbing();
    }
Пример #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         bing();
         BLL.fathercate f_bll = new BLL.fathercate();
         DataSet        ds    = f_bll.dataset();
         Drop_f.DataSource = ds.Tables[0];
         Drop_f.DataBind();
     }
 }
Пример #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)

        {
            BLL.fathercate my_f = new BLL.fathercate();
            DataSet        ds_f = my_f.dataset();
            Repeater1.DataSource = ds_f.Tables[0];
            Repeater1.DataBind();


            uid.Text = Request.QueryString["uid"].ToString();
            int u_id = Convert.ToInt32(uid.Text);



            BLL.product   prob   = new BLL.product();
            SqlDataReader dr_pro = prob.selectupdate(u_id);
            dr_pro.Read();
            market.Text    = Math.Round(Convert.ToDecimal(dr_pro["_market_price"].ToString()), 2).ToString();
            local.Text     = Math.Round(Convert.ToDecimal(dr_pro["_local_price"].ToString()), 2).ToString();
            image_id.Text  = dr_pro["_imageid"].ToString();
            title_l.Text   = dr_pro["_product_name"].ToString();
            content_s.Text = dr_pro["_describe"].ToString();
            int cate_id = Convert.ToInt32(dr_pro["_cateid"].ToString());

            catename(cate_id);
            dr_pro.Close();

            BLL.proimage b_image  = new BLL.proimage();
            DataSet      ds_image = b_image.select_sizeid(image_id.Text);
            DataList1.DataSource = ds_image.Tables[0];
            DataList1.DataBind();


            Image_1.ImageUrl = Convert.ToString(ds_image.Tables[0].Rows[0]["_imageurl"]);
            im_url           = Image_1.ImageUrl;
            img_url.Text     = im_url;
            d_color.Text     = Convert.ToString(ds_image.Tables[0].Rows[0]["_color"]);
            if (ds_image.Tables[0].Rows[0]["_sizeid"] != null)
            {
                string size_id = Convert.ToString(ds_image.Tables[0].Rows[0]["_sizeid"]);
                sizeid.Text = size_id;
                siz(sizeid.Text);
            }
        }
    }
Пример #9
0
    protected void tijiao_Click(object sender, EventArgs e)
    {
        if (fathercatename.Text != null)
        {
            Model.fathercate mym = new Model.fathercate();
            mym.fathername = fathercatename.Text;

            BLL.fathercate myb    = new BLL.fathercate();
            int            result = myb.insert(mym);
            if (result > 0)
            {
                msg("添加成功!!");
                fathercatename.Text = "";
            }
            else
            {
                msg("添加失败!!");
            }
        }
    }