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....!"); } }
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....!"); } } }