Ejemplo n.º 1
0
        public async Task <JsonResult> FillData(string Prefix, string AcctNo, string AppcId, string ApplId)
        {
            switch (Prefix)
            {
            case "gen":
                var _GeData  = (await ApplicantSignUpService.GetApplicantInfo(ApplId, AppcId, AcctNo)).cardAppcInfo;
                var CardData = new CardAppcInfoModel
                {
                    CardType           = await BaseService.GetCardType(AppcId, null, ApplId, AcctNo),
                    PinInd             = await BaseService.GetRefLib("PinInd"),
                    SKDSNo             = await BaseService.GetSKDS(ApplId, AcctNo),
                    DialogueInd        = await BaseService.GetRefLib("DialogueInd"),
                    CurrentStatus      = await BaseService.GetRefLib("AppcSts"),
                    ProductUtilization = await BaseService.WebProductGroupSelect(),
                    VehicleModel       = await BaseService.GetRefLib("VehType"),
                    CostCentre         = !string.IsNullOrEmpty(ApplId) ? await BaseService.GetCostCentre(ApplId, "Appl", true) : await BaseService.GetCostCentre(AcctNo, "Acct", true),
                    AnnualFee          = await BaseService.GetFeeCd("ANN"),
                    JoiningFee         = await BaseService.GetFeeCd("JON"),
                    BranchCd           = await BaseService.GetRefLib("BranchCd"),
                    DivisionCode       = await BaseService.GetRefLib("DivisionCd"),
                    DeptCd             = await BaseService.GetRefLib("DeptCd"),
                    CardMedia          = await BaseService.GetCardMedia(),
                };
                return(Json(new { Model = _GeData, Selects = CardData }, JsonRequestBehavior.AllowGet));

            case "fin":
                var data = (await ApplicantSignUpService.GetFinancialInfo(AppcId)).cardFinancialInfo;
                return(Json(new { Model = data }, JsonRequestBehavior.AllowGet));

            case "per":
                var _perData   = (await CardHolderService.GetPersonInfo(Request.QueryString["EntityId"])).personalInfo;
                var perSelects = 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"),
                };
                return(Json(new { Model = _perData, Selects = perSelects }, JsonRequestBehavior.AllowGet));

            case "sts":
                var stsDetails = await CardHolderService.GetChangedAcctStsDetail(AcctNo, AppcId);

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

            default:
                HttpContext.Response.StatusCode = 404;
                return(Json(null, JsonRequestBehavior.AllowGet));
            }
        }
Ejemplo n.º 2
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 { }));
            }
        }
Ejemplo n.º 3
0
        public async Task <ActionResult> ftPersonInfoSelect(int _issNo, string _entityId)
        {
            var data = (await CardHolderService.GetPersonInfo(_entityId)).personalInfo;

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