public int DeleteDAL(productPropos a) { connection(); query = "Delete AddProduct where ID = '" + a.ID + "'"; cmd = new SqlCommand(query, con); int rs = cmd.ExecuteNonQuery(); con.Close(); return(rs); }
public int UpdateDAL(productPropos a) { connection(); query = "Update AddProduct set Name ='" + a.Name + "'Price = '" + a.Price + "' where ID = '" + a.ID + "'"; cmd = new SqlCommand(query, con); int rs = cmd.ExecuteNonQuery(); con.Close(); return(rs); }
public int InsertDAL(productPropos a) { connection(); query = "Insert into AddProduct values('" + a.ID + "','" + a.Name + "','" + a.Price + "')"; cmd = new SqlCommand(query, con); int rs = cmd.ExecuteNonQuery(); con.Close(); return(rs); }
protected void Button1_Click(object sender, EventArgs e) { productPropos a = new productPropos(); a.ID = TextBox2.Text; ProductBLL A = new ProductBLL(); A.DeleteBLL(a); TextBox2.Text = ""; Label1.Text = "Your product is deleted successfully!"; }
protected void Button2_Click(object sender, EventArgs e) { productPropos a = new productPropos(); a.ID = TextBox2.Text; a.Name = TextBox1.Text; a.Price = TextBox4.Text; ProductBLL A = new ProductBLL(); A.UpdateBLL(a); TextBox1.Text = ""; TextBox2.Text = ""; TextBox4.Text = ""; Label1.Text = "Your product is Updated successfully!"; }
public int DeleteBLL(productPropos u) { int i = U.DeleteDAL(u); return(i); }
public int UpdateBLL(productPropos u) { int i = U.UpdateDAL(u); return(i); }
public int InsertBLL(productPropos u) { int i = U.InsertDAL(u); return(i); }