예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SupProps up = new SupProps();

            up.S_id = Request.QueryString["edtsup"];
            SupBLL    ub = new SupBLL();
            DataTable dt = ub.searchSupBLL(up);

            if (dt.Rows.Count > 0)
            {
                txt_sid.Text     = dt.Rows[0]["sup_id"].ToString();
                txt_name.Text    = dt.Rows[0]["name"].ToString();
                txt_cel.Text     = dt.Rows[0]["cell"].ToString();
                txt_address.Text = dt.Rows[0]["address"].ToString();
            }
            else
            {
                Response.Redirect("viewsuppliers.aspx?error=Sorry, Something Went Wrong....!");
            }
        }
예제 #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            SupProps p = new SupProps();

            p.S_id      = txt_sid.Text;
            p.S_name    = txt_name.Text;
            p.S_cell    = txt_cel.Text;
            p.S_address = txt_address.Text;

            SupBLL cus = new SupBLL();

            if (cus.updateSupBLL(p))
            {
                Response.Redirect("viewsuppliers.aspx?success=Supplier Updated Successfully");
            }
            else
            {
                Response.Redirect("viewsuppliers.aspx?error=Sorry, Something Went Wrong....!");
            }
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ProdBLL   p  = new ProdBLL();
            DataTable dt = p.AllProdBLL();

            if (dt.Rows.Count > 0)
            {
                //products.Items.Clear();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    products.Items.Add(dt.Rows[i]["prd_title"].ToString());
                }
            }
            else
            {
                Response.Write("<script>alert('Products Not Found..!')</script>");
            }

            SupBLL    s   = new SupBLL();
            DataTable dtb = s.AllSupBLL();

            if (dtb.Rows.Count > 0)
            {
                //supply.Items.Clear();
                for (int i = 0; i < dtb.Rows.Count; i++)
                {
                    supply.Items.Add(dtb.Rows[i]["name"].ToString());
                }
            }
            else
            {
                Response.Write("<script>alert('Supplyers Not Found..!')</script>");
            }


            PurBLL    pp  = new PurBLL();
            DataTable dtt = pp.getPurBLL();

            GridView1.DataSource = dtt;
            GridView1.DataBind();
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SupBLL s = new SupBLL();;

            Repeater1.DataSource = s.AllSupBLL();
            Repeater1.DataBind();

            if (Request.Params.AllKeys.Contains("dltsup"))
            {
                SupProps p = new SupProps();
                p.S_id = Request.QueryString["dltsup"];
                SupBLL ss = new SupBLL();
                if (ss.updateSupBLL(p))
                {
                    Response.Redirect("viewsuppliers.aspx?success=Deleted Successfully");
                }
                else
                {
                    Response.Redirect("viewsuppliers.aspx?error=Something Went Wrong....!");
                }
            }
        }
예제 #5
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            SupProps p = new SupProps();

            p.S_id      = txt_sid.Text;
            p.S_name    = txt_name.Text;
            p.S_cell    = txt_cell.Text;
            p.S_address = txt_address.Text;

            SupBLL cus = new SupBLL();

            if (cus.insertSupBLL(p))
            {
                Response.Redirect("supplyers.aspx?success=Record Inserted Successfully");
                txt_sid.Text     = "";
                txt_name.Text    = "";
                txt_cell.Text    = "";
                txt_address.Text = "";
            }
            else
            {
                Response.Redirect("supplyers.aspx?error=Record Inserted Unsuccessfull");
            }
        }