Esempio n. 1
0
        public async Task <ActionResult> ftVelocityDetail(VeloctyLimitListMaintModel _VelocityLimit, CardnAccNo _CardnAcct)
        {
            _VelocityLimit._CardnAccNo = _CardnAcct;
            var data = (await CardAcctSignUpService.GetCustAcctVelocityDetail(_VelocityLimit)).veloctyLimit;

            return(Json(new { velocity = data }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public async Task <ActionResult> SaveVelocityLimit(VeloctyLimitListMaintModel _VelocityLimitnList, string applId, CardnAccNo _cardnAcct, string Func)
        {
            _VelocityLimitnList._CardnAccNo = _cardnAcct;
            _VelocityLimitnList.UserId      = GetUserId;
            var _saveCustAcctVelocity = await CardAcctSignUpService.SaveCustAcctVelocity(_VelocityLimitnList, applId, Func);

            return(Json(new { resultCd = _saveCustAcctVelocity }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 3
0
 public CardAcctSignUpResponse()
 {
     acctSignUp            = new AcctSignUp();
     skds                  = new SKDS();
     mileStoneInfo         = new Milestone();
     veloctyLimit          = new VeloctyLimitListMaintModel();
     contact               = new ContactLstModel();
     vehicle               = new VehiclesListModel();
     Address               = new AddrListMaintModel();
     miscellaneousInfo     = new MiscellaneousInfoModel();
     creditAssesOperation  = new CreditAssesOperation();
     creditAssesOperations = new List <CreditAssesOperation>();
     milestoneHistories    = new List <Milestone>();
     vehicles              = new List <VehiclesListModel>();
     contacts              = new List <ContactLstModel>();
     Addresses             = new List <AddrListMaintModel>();
     skdses                = new List <SKDS>();
     acctSignUps           = new List <AcctSignUp>();
     veloctyLimits         = new List <VeloctyLimitListMaintModel>();
     cards                 = new List <CardHolderInfoModel>();
 }
Esempio n. 4
0
        public async Task <ActionResult> SaveVelocityLimitMaint(VeloctyLimitListMaintModel VelocityInfo, string _Func)
        {
            var _saveVelocity = await objCardHoldersOps.SaveVelocityLimit(VelocityInfo, _Func);

            return(Json(new { resultCd = _saveVelocity }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 5
0
        public async Task <ActionResult> ftVelocityList(jQueryDataTableParamModel Params, VeloctyLimitListMaintModel VelocityList, CardnAccNo cardnAccNo)
        {
            VelocityList._CardnAccNo = cardnAccNo;
            var list = await objCardHoldersOps.VelocityList(VelocityList);

            var filtered = list.Skip(Params.iDisplayStart).Take(Params.iDisplayLength);

            return(Json(new
            {
                sEcho = Params.sEcho,
                iTotalRecords = list.Count(),
                iTotalDisplayRecords = list.Count(),
                aaData = filtered.Select(x => new object[] { x.VelocityIndDescp,
                                                             x.ProdCdDescp, x.velocityCounter, x.ddlVelocityLimit, x.ddlVelocityLitre, x.SpentCnt, x.SpentLimit, x.SpentLitre, x.LastUpdateDate, x.UserId, x.CreationDate, x.SelectedVelocityInd, x.SelectedProdCd })
            }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 6
0
        public async Task <JsonResult> FillData(string Prefix, string ApplId)
        {
            switch (Prefix)
            {
            case "gen":
                var _Info   = (await CardAcctSignUpService.GetApplicationGeneralInfo(ApplId)).acctSignUp;
                var Selects = new AcctSignUp
                {
                    CycleNo       = await BaseService.GetCycle("I"),
                    PlasticType   = await BaseService.GetPlasticType(),
                    CorporateAcct = await BaseService.WebGetCorpCd(true),
                    //Position = await BaseClass.WebGetRefLib("Occupation"),
                    CompanyType      = await BaseService.GetRefLib("CmpyType"),
                    BillingType      = await BaseService.GetRefLib("BillingType"),
                    InvoicePref      = await BaseService.GetRefLib("InvPrefer"),
                    BusinessCategory = await BaseService.GetRefLib("BusnCategory"),
                    LangId           = await BaseService.GetRefLib("Language"),
                    TaxCategory      = await BaseService.GetRefLib("TaxCategory"),
                    NatureOfBusiness = await BaseService.GetRefLib("IndustryCd"),
                    ClientClass      = await BaseService.GetRefLib("ClientClass"),
                    ClientType       = await BaseService.GetRefLib("ClientType"),
                    PaymentMode      = await BaseService.GetRefLib("PaymtMethod"),
                    ReasonCd         = await BaseService.GetCAOReasonCd(),
                };
                return(Json(new { Model = _Info, Selects = Selects }, JsonRequestBehavior.AllowGet));


            case "fin":
                var _finInfo = (await AccountOpService.GetFinancialInfoForm(Convert.ToInt32(ApplId))).financialInfo;
                return(Json(_finInfo, JsonRequestBehavior.AllowGet));

            case "cao":
                var _credAssesInfo = (await CardAcctSignUpService.GetCAOGeneralInfo(null, ApplId)).creditAssesOperation;
                var PaymentTerm    = await BaseService.GetRefLib("PaymtTerm");

                var temp = PaymentTerm.SkipWhile(p => p.Value == "").ToList();
                PaymentTerm = (temp.OrderBy(p => Convert.ToInt32(p.Value))).ToList();

                var _CaoSelects = new CreditAssesOperation
                {
                    PaymentMode    = await BaseService.GetRefLib("PaymtMethod"),
                    PaymentTerm    = PaymentTerm,
                    TerritoryCd    = await BaseService.GetRefLib("SaleTerritory"),
                    RiskCategory   = await BaseService.GetRefLib("RiskCategory"),
                    AssesmtType    = await BaseService.GetRefLib("AssessmentType"),
                    DepositType    = await BaseService.GetRefLib("DepositType"),
                    BankAcctType   = await BaseService.GetRefLib("BankAcctType"),
                    BankName       = await BaseService.GetRefLib("Bank"),
                    ReasonCd       = await BaseService.GetCAOReasonCd(),
                    AppvStsBackOff = await BaseService.GetRefLib("ApplSts"),
                    AppvStsEDP     = await BaseService.GetRefLib("ApplSts"),
                    AppvStsQAOff   = await BaseService.GetRefLib("ApplSts"),
                    Qualitative    = await BaseService.GetRefLib("QualitativeRating"),
                    Quantitative   = await BaseService.GetRefLib("QuantitativeRating")
                    , TradingArea  = await BaseService.GetRefLib("TradingArea")
                };
                _credAssesInfo.GracePeriod = 20;
                return(Json(new { Model = _credAssesInfo, Selects = _CaoSelects }, JsonRequestBehavior.AllowGet));

            case "vel":
                var velocityLimitsList = new VeloctyLimitListMaintModel
                {
                    VelocityInd = await BaseService.GetRefLib("VelocityInd"),
                    ProdCd      = await BaseService.WebGetProduct(null),
                    CtrlType    = await BaseService.GetRefLib("CollateralType"),
                };
                var _Model = new VeloctyLimitListMaintModel
                {
                    UserId       = HttpContext.User.Identity.Name,
                    CreationDate = System.DateTime.Now.ToString("dd/MM/yyyy")
                };
                return(Json(new { Selects = velocityLimitsList, Model = _Model }, JsonRequestBehavior.AllowGet));

            case "dep":
                var _adi = new CreditAssesOperation
                {
                    DepositType  = await BaseService.GetRefLib("DepositType", null, "1"),
                    BankAcctType = await BaseService.GetRefLib("BankAcctType"),
                    BankName     = await BaseService.GetRefLib("SecurityDepositBank"),
                };
                return(Json(new { Selects = _adi, Model = new CreditAssesOperation() }, JsonRequestBehavior.AllowGet));

            case "skd":
                var Model = new SKDS
                {
                    UserId       = this.GetUserId,
                    CreationDate = NumberExtensions.DateConverter(DateTime.Now.ToShortDateString()),
                };
                var selects = new SKDS
                {
                    Sts          = await BaseService.GetRefLib("prodsts"),
                    SubsidyType  = await BaseService.GetRefLib("SubsidyLevel"),
                    Category     = BaseService.GetDataVersion().dataVersionLst,
                    SubsidyLevel = await BaseService.GetRefLib("SubsidyLevel")
                };
                return(Json(new { Selects = selects, Model = Model }, JsonRequestBehavior.AllowGet));

            case "add":
                var AddrSelects = new AddrListMaintModel
                {
                    addrtype = await BaseService.GetRefLib("Address"),
                    Country  = await BaseService.GetRefLib("Country"),
                    region   = await BaseService.GetRefLib("RegionCd"),
                };
                var AddrModel = new AddrListMaintModel
                {
                    UserId       = this.GetUserId,
                    CreationDate = System.DateTime.Now.ToString(),
                    RefTo        = "APPL"
                };
                return(Json(new { Selects = AddrSelects, Model = AddrModel }, JsonRequestBehavior.AllowGet));

            case "con":
                var otherContactList = new ContactLstModel
                {
                    ContactType = await BaseService.GetRefLib("Contact"),
                    Occupation  = await BaseService.GetRefLib("Occupation"),
                    Sts         = await BaseService.GetRefLib("ContactSts"),
                };
                var model = new ContactLstModel
                {
                    UserId       = HttpContext.User.Identity.Name,
                    CreationDate = System.DateTime.Now.ToString()
                };
                return(Json(new { Selects = otherContactList, Model = model }, JsonRequestBehavior.AllowGet));

            case "veh":
                var _VehiclesListModel = new VehiclesListModel
                {
                    VehColor = await BaseService.GetRefLib("Color"),
                    VehMaker = await BaseService.GetRefLib("VehMaker"),
                    VehModel = await BaseService.GetRefLib("VehSubModel"),
                    //check again
                    CardType = await BaseService.GetCardType(),
                    Sts      = await BaseService.GetRefLib("AcctSts"),
                    VehYr    = BaseService.WebGetYear(),
                    VehType  = await BaseService.GetRefLib("VehType")
                };
                return(Json(new { Selects = _VehiclesListModel, Model = new VehiclesListModel() }, JsonRequestBehavior.AllowGet));

            case "mis":
                var _Mis = new MiscellaneousInfoModel
                {
                    Designation = await BaseService.GetRefLib("Occupation")
                };
                return(Json(new { Model = new MiscellaneousInfoModel(), Selects = _Mis }, JsonRequestBehavior.AllowGet));

            case "csc":
                return(Json(new { Model = new CostCentre(), Selects = "" }, JsonRequestBehavior.AllowGet));

            case "apr":
                var _milestone = new Milestone
                {
                    Priority = await BaseService.GetRefLib("MilestonePriority"),
                    ReasonCd = await BaseService.GetRefLib("ReasonCd"),
                    Status   = await BaseService.GetRefLib("MilestoneSts"),
                    Owner    = (await UserAccessService.GetUserAccessListSelect()).RefLibLst
                };

                var _Status     = _milestone.Status.ToList();
                var PendingItem = _Status.FirstOrDefault(p => p.Value == "P");
                _Status.Remove(PendingItem);
                _milestone.Status = _Status;
                return(Json(new { Selects = _milestone, Model = new Milestone() }, JsonRequestBehavior.AllowGet));

            default:
                HttpContext.Response.StatusCode = 404;
                return(Json(null, JsonRequestBehavior.AllowGet));
            }
        }
Esempio n. 7
0
        public async Task <ActionResult> ftVelocityList(jQueryDataTableParamModel Params, VeloctyLimitListMaintModel _CustAcctVelocity, CardnAccNo cardnAccNo)
        {
            _CustAcctVelocity._CardnAccNo = cardnAccNo;
            var _filtered = new List <VeloctyLimitListMaintModel>();

            var list = (await CardAcctSignUpService.GetCustAcctVelocityList(_CustAcctVelocity)).veloctyLimits;

            if (!string.IsNullOrEmpty(Params.sSearch))
            {
                Params.sSearch = Params.sSearch.ToLower();
            }

            if (!string.IsNullOrEmpty(Params.sSearch))
            {
                _filtered = list.Where(p => (!string.IsNullOrEmpty(p.VelocityIndDescp) ? p.VelocityIndDescp : string.Empty).ToLower().Contains(Params.sSearch) ||
                                       (!string.IsNullOrEmpty(p.SelectedProdCd) ? p.SelectedProdCd : string.Empty).Contains(Params.sSearch) ||
                                       (!string.IsNullOrEmpty(p.velocityCounter) ? p.velocityCounter : string.Empty).Contains(Params.sSearch) ||
                                       (!string.IsNullOrEmpty(p.ddlVelocityLimit) ? p.ddlVelocityLimit : string.Empty).Contains(Params.sSearch) ||
                                       (!string.IsNullOrEmpty(p.ddlVelocityLitre.ToString()) ? p.ddlVelocityLitre.ToString() : string.Empty).Contains(Params.sSearch) ||
                                       (!string.IsNullOrEmpty(p.LastUpdateDate) ? p.LastUpdateDate : string.Empty).Contains(Params.sSearch) ||
                                       (!string.IsNullOrEmpty(p.UserId) ? p.UserId : string.Empty).Contains(Params.sSearch) ||
                                       (!string.IsNullOrEmpty(p.CreationDate) ? p.CreationDate : string.Empty).Contains(Params.sSearch) ||
                                       (!string.IsNullOrEmpty(p.SelectedVelocityInd) ? p.SelectedVelocityInd : string.Empty).Contains(Params.sSearch) ||
                                       (!string.IsNullOrEmpty(p.SelectedProdCd) ? p.SelectedProdCd : string.Empty).Contains(Params.sSearch)).ToList();

                _filtered = _filtered.Skip(Params.iDisplayStart).Take(Params.iDisplayLength).ToList();
            }
            else
            {
                _filtered = list.Skip(Params.iDisplayStart).Take(Params.iDisplayLength).ToList();
            }
            return(Json(new
            {
                sEcho = Params.sEcho,
                iTotalRecords = list.Count(),
                iTotalDisplayRecords = list.Count(),
                aaData = _filtered.Select(x => new object[] { x.SelectedVelocityInd, x.VelocityIndDescp, x.velocityCounter, x.ddlVelocityLimit, x.VelocityLitre, x.SpentCnt, x.SpentLimit, x.SpentLitre, x.LastUpdateDate, x.UserId, x.CreationDate, x.SelectedVelocityInd, x.SelectedProdCd })//, x.ddlVelocityLitre
            }, JsonRequestBehavior.AllowGet));
        }