Esempio n. 1
0
        public MTSRules GetCheckList(Int64 CustomerID, Int64 ReviewID, Int64 LoanTypeID)
        {
            MTSRules CheckListRules = new MTSRules();

            using (var db = new DBConnect(TenantSchema))
            {
                //CustLoanReviewCheckMapping CustReviewLoanCheckMapping = db.CustLoanReviewCheckMapping
                //    .Include(d => d.CheckListMaster)
                //        .ThenInclude(c => c.CheckListDetailMasters)
                //    .Single(d => d.CustomerID == CustomerID && d.ReviewTypeID == ReviewID && d.LoanTypeID == LoanTypeID);

                var obj = (from map in db.CustReviewLoanCheckMapping
                           join cdm in db.CheckListDetailMaster on map.CheckListID equals cdm.CheckListID
                           join rm in db.RuleMaster on cdm.CheckListDetailID equals rm.CheckListDetailID
                           where map.CustomerID == CustomerID && map.ReviewTypeID == ReviewID && map.LoanTypeID == LoanTypeID && cdm.Active == true
                           select new
                {
                    CheckListName = cdm.Name,
                    Rule = rm.RuleDescription
                }).ToList();

                if (obj != null)
                {
                    foreach (var item in obj)
                    {
                        CheckListRules[item.CheckListName.ToString()] = item.Rule;
                    }
                }
            }

            return(CheckListRules);
        }
Esempio n. 2
0
        private void setClassProperties()
        {
            if (loan != null)
            {
                batch = JsonConvert.DeserializeObject <Batch>(loan.LoanDetails.LoanObject);

                loanDocTypes = ruleEngineDataAccess.GetLoanDocTypes(loan.CustomerID, loan.LoanTypeID);

                CheckListRules = ruleEngineDataAccess.GetCheckList(loan.CustomerID, loan.ReviewTypeID, loan.LoanTypeID);

                stackingOrder = ruleEngineDataAccess.GetStackingOrder(loan.CustomerID, loan.ReviewTypeID, loan.LoanTypeID);

                loanStackingDetails = ruleEngineDataAccess.GetStackingOrderDetails(loan.CustomerID, loan.ReviewTypeID, loan.LoanTypeID);

                FormBatchDocFields();
            }
        }