示例#1
0
        public async Task <ActionResult> GetAdjDropDown()
        {
            var _Payment = new TxnAdjustment
            {
                Owner       = (await UserAccessService.GetUserAccessListSelect()).RefLibLst,
                AdjTxnCode  = await BaseService.WebGetTxnCode("I", "AdjustTxnCategoryMapInd", "Y"),
                PaymentType = await BaseService.GetRefLib("TxnShortDesc", null, "2")
            };

            return(Json(new { Selects = _Payment, Model = new MultiPayment() }, JsonRequestBehavior.AllowGet));
        }
示例#2
0
        public async Task <ActionResult> GetDropDown()
        {
            var _Payment = new TxnAdjustment
            {
                TxnCode      = await BaseService.GetPymtTxnCd("Pymt", null),
                Owner        = (await UserAccessService.GetUserAccessListSelect()).RefLibLst,
                IssueingBank = await BaseService.GetRefLib("Bank"),
                PaymentType  = await BaseService.GetRefLib("TxnShortDesc", null, "10"),
                GLSettlement = await BaseService.GetRefLib("GLSettlement")
            };
            var multipayment = new MultiPayment();

            multipayment.ChequeAmt = "0";
            return(Json(new { Selects = _Payment, Model = multipayment }, JsonRequestBehavior.AllowGet));
        }
        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));
            }
        }