public async Task <ActionResult> SaveContact(ContactLstModel _ContactList, string RefTo, string Func)
        {
            _ContactList.UserId = GetUserId;
            var _saveContactMaint = await CardAcctSignUpService.SaveContactsList(_ContactList, RefTo, Func);

            return(Json(new { resultCd = _saveContactMaint }, JsonRequestBehavior.AllowGet));
        }
 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>();
 }
Beispiel #3
0
        public async Task <ActionResult> SaveAddr(ContactLstModel ContactLst, string _RefTo, string _Func)
        {
            var SaveAddrInfo = await objCardHoldersOps.SaveContact(ContactLst, _RefTo, _Func);

            return(Json(new { AddrInfo = SaveAddrInfo }, 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));
            }
        }
Beispiel #5
0
        public async Task <ActionResult> FillData(string prefix, string id)
        {
            switch (prefix)
            {
            case "gen":
                var data           = (await MechSignUpService.GetBusinessLocationGeneralInfoDetail(id)).merchantDetail;
                var _dealerGenInfo = new MerchantDetails
                {
                    Ownership      = await BaseService.GetRefLib("MerchOwnership"),
                    SIC            = await BaseService.GetMerchType("S"),
                    DBARegion      = await BaseService.GetRefLib("RegionCd"),
                    DBACity        = await BaseService.GetRefLib("City"),
                    DBAState       = await BaseService.WebGetState(null),
                    BankAcctType   = await BaseService.GetRefLib("BankAcctType"),
                    BankBranchCode = await BaseService.GetRefLib("BranchCd"),
                    cycNo          = await BaseService.GetCycle("A"),
                    CurrentStatus  = await BaseService.GetRefLib("MerchAcctSts"),
                    ReasonCd       = await BaseService.GetRefLib("MerchReasonCd"),
                    MCC            = await BaseService.GetMerchType("MerchType"),
                    BankAcctName   = await BaseService.GetRefLib("Bank"),
                    AreaCodes      = await BaseService.GetRefLib("AreaCd")
                };
                return(Json(new { Selects = _dealerGenInfo, Model = data }, JsonRequestBehavior.AllowGet));

            case "ter":
                var term = new BusnLocTerminal
                {
                    Status       = await BaseService.GetRefLib("TermSts"),
                    ProdType     = await BaseService.GetDeviceModel(),
                    TermType     = await BaseService.GetRefLib("TermType"),
                    ReasonCd     = await BaseService.GetRefLib("TermReasonCd"),
                    UserId       = this.GetUserId,
                    CreationDate = NumberExtensions.DateConverter(System.DateTime.Now.ToString())
                };
                return(Json(new { Selects = term, Model = new BusnLocTerminal() }, 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 "add":
                var countries = await BaseService.GetRefLib("Country");

                var AddrSelects = new AddrListMaintModel
                {
                    addrtype = await BaseService.GetRefLib("Address"),
                    State    = countries.Count() > 1 ? await BaseService.WebGetState(countries[1].Value) : null, //changes
                    Country  = countries,
                    region   = await BaseService.GetRefLib("RegionCd"),
                };
                var AddrModel = new AddrListMaintModel
                {
                    UserId       = this.GetUserId,
                    CreationDate = System.DateTime.Now.ToString(),
                    RefTo        = "BUSN",
                    RefKey       = Convert.ToString(id)
                };
                return(Json(new { Selects = AddrSelects, Model = AddrModel }, JsonRequestBehavior.AllowGet));

            case "sts":
                var StsDetails = (await CardHolderService.GetChangedAcctStsDetail(id.ToString(), "BUSN")).changeStatus;
                var selecs     = new ChangeStatus
                {
                    CurrentStatus  = await BaseService.GetRefLib("MerchAcctSts"),
                    RefType        = await BaseService.GetRefLib("EventType"),
                    ReasonCode     = await BaseService.GetRefLib("MerchReasonCd", ""),
                    ChangeStatusTo = await BaseService.GetRefLib("MerchAcctSts")
                };
                return(Json(new { Model = StsDetails, Selects = selecs }, JsonRequestBehavior.AllowGet));

            case "prs":
                var _Prz = new MerchProductPrize
                {
                    ProdCd = await BaseService.WebGetProduct(null, false)
                };
                return(Json(new { Selects = _Prz, Model = new MerchProductPrize() }, JsonRequestBehavior.AllowGet));

            case "own":
                var _OwnerShip = new MerchChangeOwnership
                {
                    BankAcctType = await BaseService.GetRefLib("BankAcctType"),
                    BankName     = await BaseService.GetRefLib("Bank"),
                    DBAState     = await BaseService.WebGetState(null)
                };
                var ownershipInfo = (await MechSignUpService.GetMerchChgOwnership(id)).merchChangeOwnership;
                return(Json(new { Selects = _OwnerShip, Model = ownershipInfo }, JsonRequestBehavior.AllowGet));

            default:
                HttpContext.Response.StatusCode = 404;
                return(Json(null, JsonRequestBehavior.AllowGet));
            }
        }