public virtual GovernmentFundsBLL GetByGovernmentFundID(int GovernmentFundID) { try { GovernmentFundsBLL GovernmentFundBLL = null; GovernmentFunds GovernmentFund = new GovernmentFundsDAL().GetByGovernmentFundTypeID(GovernmentFundID); if (GovernmentFund != null) { GovernmentFundBLL = new GovernmentFundsBLL().MapGovernmentFund(GovernmentFund); } return(GovernmentFundBLL); } catch { throw; } }
internal GovernmentFundsBLL MapGovernmentFund(GovernmentFunds GovernmentFund) { try { GovernmentFundsBLL GovernmentFundBLL = null; if (GovernmentFund != null) { GovernmentFundBLL = new GovernmentFundsBLL() { GovernmentFundID = GovernmentFund.GovernmentFundID, EmployeeCode = new EmployeesCodesBLL().MapEmployeeCode(GovernmentFund.EmployeesCodes), GovernmentFundType = new GovernmentFundsTypesBLL().MapGovernmentFundsTypes(GovernmentFund.GovernmentFundsTypes), GovernmentDeductionType = new GovernmentDeductionsTypesBLL().MapGovernmentDeductionsTypesBLL(GovernmentFund.GovernmentDeductionsTypes), LoanNo = GovernmentFund.LoanNo, LoanDate = GovernmentFund.LoanDate.Value, MonthlyDeductionAmount = GovernmentFund.MonthlyDeductionAmount, TotalDeductionAmount = GovernmentFund.TotalDeductionAmount, DeductionStartDate = GovernmentFund.DeductionStartDate, IsActive = GovernmentFund.IsActive, LetterDate = GovernmentFund.LetterDate, DeactiveDate = GovernmentFund.DeactiveDate, GovernmentFundDeactiveReason = new GovernmentFundsDeactiveReasonsBLL().MapGovernmentFundsDeactiveReasonsBLL(GovernmentFund.GovernmentFundsDeactiveReasons), LetterNo = GovernmentFund.LetterNo, Notes = GovernmentFund.Notes, ContractNo = GovernmentFund.ContractNo, BankIPAN = GovernmentFund.BankIPAN, KSACity = new KSACitiesBLL().MapKSACity(GovernmentFund.KSACities), SponserToIDNo = GovernmentFund.SponserToIDNo, SponserToName = GovernmentFund.SponserToName, CreatedDate = GovernmentFund.CreatedDate, CreatedBy = new EmployeesCodesBLL().MapEmployeeCode(GovernmentFund.CreatedByNav) }; } return(GovernmentFundBLL); } catch { throw; } }