Exemplo n.º 1
0
    protected void sc_Command(object sender, CommandEventArgs e)
    {
        string size_id = Convert.ToString(e.CommandArgument);

        BLL.size bsize  = new BLL.size();
        int      result = bsize.delete(size_id);

        BLL.proimage  myb = new BLL.proimage();
        SqlDataReader dr  = myb.s_imageurl(size_id);

        BLL.proimage isize    = new BLL.proimage();
        int          i_result = isize.delete_1(size_id);


        dr.Read();

        string path = "~/" + dr["_imageurl"].ToString();

        dr.Close();

        if (File.Exists(Server.MapPath(path)))
        {
            File.Delete(Server.MapPath(path));
        }
        if (i_result > 0)
        {
            msg("删除成功!!");
            bing();
        }
    }
Exemplo n.º 2
0
    protected void sc_Command(object sender, CommandEventArgs e)
    {
        string size_id = Convert.ToString(e.CommandArgument);

        BLL.size bsize = new BLL.size();
        int result = bsize.delete(size_id);
        BLL.proimage myb = new BLL.proimage();
        MySqlDataReader dr = myb.s_imageurl(size_id);
        BLL.proimage isize = new BLL.proimage();
        int i_result = isize.delete_1(size_id);

        dr.Read();

        string path = "~/" + dr["_imageurl"].ToString();
        dr.Close();

        if (File.Exists(Server.MapPath(path)))
        {

            File.Delete(Server.MapPath(path));
        }
        if (i_result > 0)
        {
            msg("删除成功!!");
            bing();
        }
    }
Exemplo n.º 3
0
 public void sbing()
 {
     BLL.size bsize = new BLL.size();
     DataSet ds = bsize.select_size(u_sizeid.Text);
     GridView1.DataSource = ds.Tables[0];
     GridView1.DataBind();
 }
Exemplo n.º 4
0
    public void sbing()
    {
        BLL.size bsize = new BLL.size();
        DataSet  ds    = bsize.select_size(u_sizeid.Text);

        GridView1.DataSource = ds.Tables[0];
        GridView1.DataBind();
    }
Exemplo n.º 5
0
 protected void tain_Click(object sender, EventArgs e)
 {
     Model.size mym = new Model.size();
     mym.sizeid = u_sizeid.Text;
     mym.sizename = Dropsize.SelectedValue;
     BLL.size myb = new BLL.size();
     int result = myb.insert(mym);
     sbing();
 }
Exemplo n.º 6
0
    protected void tain_Click(object sender, EventArgs e)
    {
        Model.size mym = new Model.size();
        mym.sizeid   = u_sizeid.Text;
        mym.sizename = Dropsize.SelectedValue;
        BLL.size myb    = new BLL.size();
        int      result = myb.insert(mym);

        sbing();
    }
Exemplo n.º 7
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Delete")
        {
            Model.product mym = new Model.product();
            mym.id = Convert.ToInt32(e.CommandArgument);
            BLL.product myb = new BLL.product();



            string s_imageid = myb.select_imageid(mym);


            BLL.proimage b_image = new BLL.proimage();

            DataSet ds = b_image.select_sizeid(s_imageid);



            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string size_id = Convert.ToString(ds.Tables[0].Rows[i]["_sizeid"]);

                BLL.size s_bll = new BLL.size();

                int result_s = s_bll.delete(size_id);


                string path1 = Convert.ToString(ds.Tables[0].Rows[i]["_imageurl"]);

                string path = "~/" + path1;

                if (File.Exists(Server.MapPath(path)))
                {
                    File.Delete(Server.MapPath(path));
                }
            }

            int r_image = b_image.delete(s_imageid);

            int result = myb.delete_id(mym);

            if (result > 0)
            {
                msg("删除成功!!");
                bing();
            }
        }

        if (e.CommandName == "Edit")
        {
            Response.Redirect("proupdate.aspx?id=" + e.CommandArgument + "");
        }
    }
Exemplo n.º 8
0
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     int u_id = Convert.ToInt32(e.CommandArgument);
     BLL.size b_ss = new BLL.size();
     int result = b_ss.delete_1(u_id);
     if (result > 0)
     {
         msg("删除成功!!");
         sbing();
     }
 }
Exemplo n.º 9
0
    public void siz(string size_id)
    {
        BLL.size b_size = new BLL.size();
        DataSet  b_ds   = b_size.select_size(size_id);

        DataList2.DataSource = b_ds.Tables[0];
        DataList2.DataBind();
        if (b_ds.Tables[0].Rows.Count > 0)
        {
            _size.Text = Convert.ToString(b_ds.Tables[0].Rows[0]["_sizename"]);
        }
    }
Exemplo n.º 10
0
 protected void qued_Click(object sender, EventArgs e)
 {
     Model.size mym = new Model.size();
     mym.sizeid = sizeidla.Text;
     mym.sizename = Dropsize.SelectedValue;
     BLL.size myb = new BLL.size();
     int result = myb.insert(mym);
     if (result > 0)
     {
         sizela.Text += Dropsize.SelectedValue + ",";
     }
 }
Exemplo n.º 11
0
    protected void qued_Click(object sender, EventArgs e)
    {
        Model.size mym = new Model.size();
        mym.sizeid   = sizeidla.Text;
        mym.sizename = Dropsize.SelectedValue;
        BLL.size myb    = new BLL.size();
        int      result = myb.insert(mym);

        if (result > 0)
        {
            sizela.Text += Dropsize.SelectedValue + ",";
        }
    }
Exemplo n.º 12
0
    public string sb(string size_id)
    {
        string str=null;
        BLL.size b_size = new BLL.size();
        DataSet ds = b_size.select_size(size_id);

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            str =str + Convert.ToString( ds.Tables[0].Rows[i]["_sizename"])+" ";

        }
        return str ;
    }
Exemplo n.º 13
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        int u_id = Convert.ToInt32(e.CommandArgument);

        BLL.size b_ss   = new BLL.size();
        int      result = b_ss.delete_1(u_id);

        if (result > 0)
        {
            msg("删除成功!!");
            sbing();
        }
    }
Exemplo n.º 14
0
    public string  sb(string size_id)
    {
        string str = null;

        BLL.size b_size = new BLL.size();
        DataSet  ds     = b_size.select_size(size_id);

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            str = str + Convert.ToString(ds.Tables[0].Rows[i]["_sizename"]) + " ";
        }
        return(str);
    }
Exemplo n.º 15
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Delete")
        {
            Model.product mym = new Model.product();
            mym.id = Convert.ToInt32(e.CommandArgument);
            BLL.product myb = new BLL.product();

            string s_imageid = myb.select_imageid(mym);

            BLL.proimage b_image = new BLL.proimage();

            DataSet ds = b_image.select_sizeid(s_imageid);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string size_id = Convert.ToString(ds.Tables[0].Rows[i]["_sizeid"]);

                BLL.size s_bll = new BLL.size();

                int result_s = s_bll.delete(size_id);

                string path1 = Convert.ToString(ds.Tables[0].Rows[i]["_imageurl"]);

                string path = "~/" + path1;

                if (File.Exists(Server.MapPath(path)))
                {

                    File.Delete(Server.MapPath(path));
                }

            }

                int r_image = b_image.delete(s_imageid);

                int result = myb.delete_id(mym);

                if (result > 0)
                {
                    msg("删除成功!!");
                    bing();
                }

            }

            if (e.CommandName == "Edit")
            {
                Response.Redirect("proupdate.aspx?id="+e.CommandArgument+"");
            }
    }