private void SaveRecord() { ProductGroupDetails clsDetails = new ProductGroupDetails(); clsDetails.ProductGroupID = Convert.ToInt64(lblProductGroupID.Text); clsDetails.ProductGroupCode = txtProductGroupCode.Text; clsDetails.ProductGroupName = txtProductGroupName.Text; clsDetails.UnitDetails = new UnitDetails { UnitID = Convert.ToInt32(cboProductGroupUnit.SelectedItem.Value) }; clsDetails.Price = Convert.ToDecimal(txtProductPrice.Text); clsDetails.PurchasePrice = Convert.ToDecimal(txtPurchasePrice.Text); clsDetails.IncludeInSubtotalDiscount = chkIncludeInSubtotalDiscount.Checked; clsDetails.VAT = Convert.ToDecimal(txtVAT.Text); clsDetails.EVAT = Convert.ToDecimal(txtEVAT.Text); clsDetails.LocalTax = Convert.ToDecimal(txtLocalTax.Text); ProductGroup clsProductGroup = new ProductGroup(); clsProductGroup.Update(clsDetails); clsProductGroup.CommitAndDispose(); }