protected void btnSubmite_Click(object sender, EventArgs e) { if (Page.IsValid) { AddonProductsModal model; model = client.GetAddonProductByID(txtAddonName.Text, ParlourId); if (model != null && ProductID == new Guid("00000000-0000-0000-0000-000000000000")) { ShowMessage(ref lblMessage, MessageType.Danger, "Addon Product Already Exists."); } else { model = new AddonProductsModal(); model.pkiProductID = ProductID; model.DateCreated = System.DateTime.Now; model.UserID = UserID.ToString(); model.ProductDesc = txtDescription.Text; model.ProductCost = Convert.ToDecimal(txtPremium.Text); model.ProductCover = Convert.ToDecimal(txtCover.Text); model.IsProductOngoing = 0; if (chkongoing.Checked) { model.IsProductOngoing = 1; } model.IsProductLaybye = 0; if (chkLaybye.Checked) { model.IsProductLaybye = 1; } model.Parlourid = ParlourId; model.LastModified = System.DateTime.Now; model.ModifiedUser = UserName; model.ProductName = txtAddonName.Text; //================================================================ Guid retID = client.SaveAddonProductDetails(model); ProductID = retID; ShowMessage(ref lblMessage, MessageType.Success, "Addon Product Details successfully saved"); BindAddonProductList(); ClearControl(); } lblMessage.Visible = true; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "goToTab512", "goToTab(5)", true); } }