Exemple #1
0
        public async Task <JsonResult> FillData(string Prefix, string CardNo)//,string acctNo
        {
            switch (Prefix)
            {
            case "gen":
                var data = (await CardHolderService.GetGeneralInfo(CardNo)).cardHolderInfo;
                var _cardAppcInfoSignUp = new CardHolderInfoModel
                {
                    CardType           = await BaseService.GetCardType(null, null, null, Request.QueryString["AcctNo"]),
                    CostCentre         = await BaseService.GetCostCentre(Request.QueryString["AcctNo"], "ACCT", true),
                    ReasonCd           = await BaseService.GetRefLib("ReasonCd"),
                    SKDSNo             = await BaseService.GetSKDS(null, Request.QueryString["AcctNo"]),
                    RenewalInd         = await BaseService.GetRefLib("RenewalInd"),
                    DialogueInd        = await BaseService.GetRefLib("DialogueInd"),
                    PINInd             = await BaseService.GetRefLib("PinInd"),
                    ProductUtilization = await BaseService.WebProductGroupSelect(),
                    VehicleModel       = await BaseService.GetRefLib("VehSubModel"),
                    AnnualFee          = await BaseService.GetFeeCd("ANN", true),
                    JonFee             = await BaseService.GetFeeCd("JON", true),
                    BranchCd           = await BaseService.GetRefLib("BranchCd"),
                    DivisionCode       = await BaseService.GetRefLib("DivisionCd"),
                    DeptCd             = await BaseService.GetRefLib("DeptCd"),
                    CardMedia          = await BaseService.GetCardMedia()
                };

                ViewBag.AcctNo = Request.QueryString["AcctNo"];
                return(Json(new { Model = data, Selects = _cardAppcInfoSignUp }, JsonRequestBehavior.AllowGet));

            case "fin":
                var fin = (await CardHolderService.GetFinancialInfo(CardNo)).cardFinancialInfoModel;
                return(Json(new { Model = fin }, JsonRequestBehavior.AllowGet));

            case "per":
                var per     = (await CardHolderService.GetPersonInfo(Request.QueryString["EntityId"])).personalInfo;
                var Selects = new PersonInfoModel
                {
                    title      = await BaseService.GetRefLib("Title"),
                    IdType     = await BaseService.GetRefLib("IcType"),
                    AltIdType  = await BaseService.GetRefLib("IcType"),
                    gender     = await BaseService.GetRefLib("Gender"),
                    Occupation = await BaseService.GetRefLib("Occupation"),
                    DeptId     = await BaseService.GetRefLib("Dept")
                };
                return(Json(new { Model = per, Selects = Selects }, JsonRequestBehavior.AllowGet));

            case "sts":
                var stsDetails = await CardHolderService.GetChangedAcctStsDetail(CardNo, "CARD");

                var selecs = new ChangeStatus
                {
                    CurrentStatus  = await BaseService.GetRefLib("CardSts"),
                    RefType        = await BaseService.GetRefLib("EventType"),
                    ReasonCode     = await BaseService.GetRefLib("ReasonCd", "32"),
                    ChangeStatusTo = await BaseService.GetRefLib("CardSts")
                };
                return(Json(new { Model = stsDetails.changeStatus, Selects = selecs }, JsonRequestBehavior.AllowGet));

            case "rep":
                var rep        = (await CardHolderService.GetCardReplacementInfo(CardNo)).cardReplacement;
                var repSelects = new CardReplacement
                {
                    FeeCd         = await BaseService.GetFeeCd("RPL"),
                    ReasonCd      = await BaseService.GetRefLib("ReasonCd", "32"),
                    CurrentStatus = await BaseService.GetRefLib("CardSts"),
                    CardMedia     = await BaseService.GetCardMedia()
                };
                return(Json(new { Model = rep, Selects = repSelects }, JsonRequestBehavior.AllowGet));

            case "loc":
                var locationAcceptanceList = new LocationAcceptListModel
                {
                    State         = await BaseService.WebGetState("608"),
                    BusnLocations = new List <SelectListItem>(),
                    UserId        = HttpContext.User.Identity.Name,
                    CreationDate  = System.DateTime.Now.ToString()
                };
                return(Json(new { Selects = locationAcceptanceList, Model = new LocationAcceptListModel() }, JsonRequestBehavior.AllowGet));

            case "pdc":
                var _prodDiscount = new ProductDiscount
                {
                    ProdCd       = await BaseService.WebProductGroupSelect(),
                    RebatePlan   = await BaseService.WebGetPlan("2"),
                    DiscPlan     = await BaseService.WebGetPlan("1"),
                    ProdDiscType = await BaseService.GetRefLib("ProdDiscType"),
                    PlanId       = new List <SelectListItem>()
                };
                return(Json(new { Selects = _prodDiscount, Model = new ProductDiscount() }, JsonRequestBehavior.AllowGet));

            default:
                return(Json(new { }));
            }
        }
Exemple #2
0
        public async Task <ActionResult> ftGeneralInfoSelect(string _cardNo)
        {
            var data = (await CardHolderService.GetGeneralInfo(_cardNo)).cardHolderInfo;

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