protected void btnadd_Click(object sender, EventArgs e) { string totalPid = txtcname.Text.Trim().ToUpper() + "-" + txtcid.Text.Trim(); int? InsertProductdetStatus; objProductsPL.prodName = totalPid; objProductsPL.productname = txtname.Text.Trim().ToString(); objProductsPL.unitweight = Convert.ToInt32(txtunit.Text.ToString()); objProductsPL.company = txtcompany.Text.ToString(); objProductsPL.purpose = (txtpurpose.Text.Trim().ToString()== "" ? null : txtpurpose.Text.Trim()); objProductsPL.producttype = ddlproducttype1.SelectedItem.Text.ToString(); objProductsPL.unitprice = Convert.ToDouble(txtunitprice.Text.ToString()); objProductsPL.productid3 = ddlctype.SelectedItem.Text.ToString(); objProductsPL.username = Session["username"].ToString(); InsertProductdetStatus = objProductsBAL.ProductidDetInsert(objProductsPL); if (InsertProductdetStatus.Equals(1)) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "UpdateDetails", "alert('Details Already Exist');", true); } else if (InsertProductdetStatus.Equals(2)) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "UpdateDetails", "alert('Added Successfully');", true); Grid(); clear(); bindRate(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)