Exemplo n.º 1
0
        public async Task <ActionResult> SaveNewCardInfo(CardAppcInfoModel _cardRawData, string AccNo, string _AppcID)
        {
            _cardRawData.AcctNo = AccNo;
            var _SaveApplGeneralInfoMaint = await ApplicantSignUpService.SaveApplicantInfo(_cardRawData, null, _AppcID, GetUserId);

            return(Json(new { resultCd = _SaveApplGeneralInfoMaint, AppcID = _SaveApplGeneralInfoMaint.returnValue.AppcId, EntityId = _SaveApplGeneralInfoMaint.returnValue.EntityId }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
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));
            }
        }
Exemplo n.º 3
0
        /*************************************
        *  Created by:   dandy
        *  Created on:  june 08, 2017
        *  Function:     SaveApplicantInfo
        *  Purpose:      SaveApplicantInfo
        *  Inputs:       CardAppcInfoDTO,applId,appcid,userId
        *  Returns:      SaveAcctSignUpResponse
        *************************************/
        public async Task <SaveAcctSignUpResponse> SaveApplicantInfo(CardAppcInfoModel cardAppcInfoModel, string applId, string appcid, string userId)
        {
            Logger.Info("Invoking SaveApplicantInfo function");
            var response = new SaveAcctSignUpResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var applicantSignUpDAO = scope.Resolve <IApplicantSignUpDAO>();
                    var controlDAO         = scope.Resolve <IControlDAO>();
                    var cardAppcInfoDto    = Mapper.Map <CardAppcInfoModel, CardAppcInfoDTO>(cardAppcInfoModel);
                    var result             = await applicantSignUpDAO.SaveApplicantInfo(cardAppcInfoDto, applId, appcid, userId);

                    var message = await controlDAO.GetMessageCode(Convert.ToInt32(result.Flag));

                    response.desp = message.Descp;
                    response.returnValue.AppcId   = result.paraOut.AppcId;
                    response.returnValue.EntityId = result.paraOut.EntityId;
                    response.flag = message.Flag;
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in SaveApplicantInfo: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.flag    = 1;
                response.Message = msg;
            }
            return(response);
        }
Exemplo n.º 4
0
        public async Task <ActionResult> SaveApplicantInfo(CardAppcInfoModel _CardData, string _ApplID, string _AppcID)
        {
            var _SaveApplGeneralInfoMaint = await ApplicantSignUpService.SaveApplicantInfo(_CardData, _ApplID, _AppcID, GetUserId);

            return(Json(new { resultCd = _SaveApplGeneralInfoMaint, AppcID = _SaveApplGeneralInfoMaint.returnValue.AppcId, EntityId = _SaveApplGeneralInfoMaint.returnValue.EntityId }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 5
0
 public ApplicantSignUpResponse()
 {
     cardAppcInfo      = new CardAppcInfoModel();
     cardFinancialInfo = new CardFinancialInfoModel();
     cardAppcInfoLst   = new List <CardAppcInfoModel>();
 }