public ActionResult Create(GovernmentFundsViewModel GovernmentFundsVM) { GovernmentFundsBLL GovernmentFundBLL = new GovernmentFundsBLL(); GovernmentFundBLL.EmployeeCode = new EmployeesCodesBLL() { EmployeeCodeID = GovernmentFundsVM.EmployeeCodeID }; GovernmentFundBLL.GovernmentDeductionType = GovernmentFundsVM.GovernmentDeductionType; GovernmentFundBLL.GovernmentFundType = GovernmentFundsVM.GovernmentFundType; GovernmentFundBLL.LoanNo = GovernmentFundsVM.LoanNo; GovernmentFundBLL.LoanDate = GovernmentFundsVM.LoanDate; GovernmentFundBLL.MonthlyDeductionAmount = GovernmentFundsVM.MonthlyDeductionAmount; GovernmentFundBLL.TotalDeductionAmount = GovernmentFundsVM.TotalDeductionAmount; GovernmentFundBLL.DeductionStartDate = GovernmentFundsVM.DeductionStartDate; GovernmentFundBLL.ContractNo = GovernmentFundsVM.ContractNo; GovernmentFundBLL.BankIPAN = GovernmentFundsVM.BankIPAN; GovernmentFundBLL.KSACity = new KSACitiesBLL() { KSACityID = GovernmentFundsVM.KSACity.KSACityID }; GovernmentFundBLL.SponserToIDNo = GovernmentFundsVM.SponserToIDNo; GovernmentFundBLL.SponserToName = GovernmentFundsVM.SponserToName; GovernmentFundBLL.LoginIdentity = UserIdentity; Result result = GovernmentFundBLL.Add(); if (result.EnumMember == GovernmentFundsValidationEnum.Done.ToString()) { } else if (result.EnumMember == GovernmentFundsValidationEnum.RejectedBecauseOfBeforeHiringDate.ToString()) { throw new CustomException(Resources.Globalization.ValidationBeforeHiringText.ToString()); } else if (result.EnumMember == GovernmentFundsValidationEnum.RejectedBecauseOfMonthlyDeductionAmountShouldNotGreaterThanTotalDeductionAmount.ToString()) { throw new CustomException(Resources.Globalization.ValidationDeductionAmountShouldNotGreaterThenTotalDeductionAmountText); } return(Json(new { GovernmentFundID = GovernmentFundBLL.GovernmentFundID }, JsonRequestBehavior.AllowGet)); }