예제 #1
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));
            }
        }
예제 #2
0
        public async Task <ActionResult> ftGetBusinessLocationGeneralInfoDetail(string acctNo, string BusnLocation)//SelectDealersGeneralInfo
        {
            var data = (await MechSignUpService.GetBusinessLocationGeneralInfoDetail(BusnLocation)).merchantDetail;

            return(Json(new { result = data }, JsonRequestBehavior.AllowGet));
        }