protected void btnSave_Click(object sender, EventArgs e) { try { if (Validate()) { Entity.Common.MemberMaster membermaster = new Entity.Common.MemberMaster(); BusinessLayer.Common.MemberMaster objMemberMaster = new BusinessLayer.Common.MemberMaster(); membermaster.LedgerTypeId = ddlLedgerType.SelectedValue; membermaster.AccountGroupId = Convert.ToInt32(ddlAccountsGroup.SelectedValue); if (ddlAccountsSubGroup.SelectedIndex == 0) { membermaster.AccountSubGroupId = 0; } else { membermaster.AccountSubGroupId = Convert.ToInt32(ddlAccountsSubGroup.SelectedValue); } membermaster.IsCostCenterApplicable = (chkCostCenter.Checked) ? true : false; objMemberMaster.MemberMasterLedgerDefaultConfiguration_Update(membermaster); Message.IsSuccess = true; Message.Text = "Updated Successfully."; } } catch { Message.IsSuccess = false; Message.Text = "Can Not Update!!!"; } Message.Show = true; }