/// <summary> /// 取得客戶綁定代繳契約狀態 /// </summary> /// <param name="model">取得客戶綁定代繳契約狀態 Input</param> /// <returns>取得客戶綁定代繳契約狀態 Output</returns> public async Task <CustProxyPayStatus> GetCustProxyPayStatus(GetCustInfoInput model) { // 透過 Api 把資料送出去 string apiUrl = "APP_ACCT_BIND/CUST_PROXY_PAY_STATUS"; BaseResult <CustProxyPayStatus> baseListResult = await ApiService.Instance.ApiGetCustProxyPayStatus(model, apiUrl); CustProxyPayStatus result = new CustProxyPayStatus(); if (baseListResult.Result.ReturnCode == 0 && baseListResult.Data != null) { result = baseListResult.Data; } return(result); }
/// <summary> /// 取得會員資訊 /// </summary> /// <param name="model">取得會員資訊 Input</param> /// <returns>取得會員資訊 Output</returns> public async Task <GetCustInfoOutput> GetCustInfo(GetCustInfoInput model) { // 透過 Api 把資料送出去 string apiUrl = "APP_ACCT_BIND/GET_CUST_INFO"; BaseResult <GetCustInfoOutput> baseListResult = await ApiService.Instance.ApiGetCustInfo(model, apiUrl); GetCustInfoOutput result = new GetCustInfoOutput(); if (baseListResult.Result.ReturnCode == 0 && baseListResult.Data != null) { result = baseListResult.Data; } return(result); }
public async Task <ActionResult> GetArRecLv1() { GetCustInfoInput cusModel = new GetCustInfoInput(); GetCustInfoOutput cusResult = new GetCustInfoOutput(); if (this.TokenVerify.Id == string.Empty) { cusModel = new GetCustInfoInput { MBR_ID = this.TokenVerify.MbrId, MbrId = this.TokenVerify.MbrId, DevId = this.TokenVerify.DevId, Token = this.TokenVerify.Token }; // 取得會員資料 HomeService homeService = new HomeService(); cusResult = await homeService.GetCustInfo(cusModel); if (cusResult.ID != string.Empty) { // 取得全資料 InitOutput initOutput = await homeService.INIT(cusResult.ID); System.Web.HttpCookie AridCookie = this.AirdCookie(cusResult.ID ?? string.Empty, this.TokenVerify.MbrId, this.TokenVerify.DevId, this.TokenVerify.Token, initOutput?.CUST_ID ?? string.Empty, initOutput?.CNTRT_NO ?? string.Empty); this.Response.Cookies.Add(AridCookie); } } GetArRecLvInput model = new GetArRecLvInput { //ID = this.TokenVerify.Id, ID = !string.IsNullOrEmpty(cusResult.ID) ? cusResult.ID : this.TokenVerify.Id, COMP_ID = this.TokenVerify.CustId, MbrId = this.TokenVerify.MbrId, DevId = this.TokenVerify.DevId, Token = this.TokenVerify.Token, SYS_ID = Common.GetSysId() }; AppFormPayService appFormPayService = new AppFormPayService(); BaseListResult <GetArRecLvOutput> result = await appFormPayService.GetArRecLv1(model); return(this.Json(result)); }
/// <summary> /// 取得客戶綁定代繳契約狀態 /// </summary> /// <param name="model">param</param> /// <param name="apiUrl">Api 路徑</param> /// <returns>result</returns> public async Task <BaseResult <CustProxyPayStatus> > ApiGetCustProxyPayStatus(GetCustInfoInput model, string apiUrl) { BaseResult <CustProxyPayStatus> result = await this.GetApiResultAsync <BaseResult <CustProxyPayStatus> >(apiUrl, model); return(result); }
/// <summary> /// 取得會員資訊 /// </summary> /// <param name="model">param</param> /// <param name="apiUrl">Api 路徑</param> /// <returns>result</returns> public async Task <BaseResult <GetCustInfoOutput> > ApiGetCustInfo(GetCustInfoInput model, string apiUrl) { BaseResult <GetCustInfoOutput> result = await this.GetApiResultAsync <BaseResult <GetCustInfoOutput> >(apiUrl, model); return(result); }
/// <summary> /// 繳款 /// </summary> /// <param name="MbrId">會員編號(持久登入驗證)</param> /// <param name="DevId">裝置編號(持久登入驗證)</param> /// <param name="Token">持久登入用Token(持久登入驗證)</param> /// <returns></returns> public async Task <ActionResult> Index(string MbrId, string DevId, string Token) { if (string.IsNullOrEmpty(MbrId) && string.IsNullOrEmpty(this.TokenVerify?.MbrId)) { return(this.Json(new { isError = true, message = "查無資料!!!" }, JsonRequestBehavior.AllowGet)); } GetCustInfoInput model = new GetCustInfoInput { MBR_ID = string.IsNullOrEmpty(MbrId) ? this.TokenVerify.MbrId : MbrId, MbrId = string.IsNullOrEmpty(MbrId) ? this.TokenVerify.MbrId : MbrId, DevId = string.IsNullOrEmpty(DevId) ? this.TokenVerify.DevId : DevId, Token = string.IsNullOrEmpty(Token) ? this.TokenVerify.Token : Token }; // 取得會員資料 HomeService homeService = new HomeService(); GetCustInfoOutput result = await homeService.GetCustInfo(model); // 是否已綁定個人資料或代繳契約 CustProxyPayStatus proxyPayStatus = await homeService.GetCustProxyPayStatus(model); if (string.IsNullOrEmpty(result.ID) || proxyPayStatus.REG_COUNT < 3) { this.ViewBag.ShowAddButton = true; } else { this.ViewBag.ShowAddButton = false; } if (!string.IsNullOrEmpty(MbrId) && (string.IsNullOrEmpty(this.TokenVerify?.MbrId) || this.TokenVerify.MbrId != MbrId)) { //// 取得會員資料 //HomeService homeService = new HomeService(); //GetCustInfoOutput result = await homeService.GetCustInfo(model); //// 是否已綁定個人資料或代繳契約 //CustProxyPayStatus proxyPayStatus = await homeService.GetCustProxyPayStatus(model); //if (string.IsNullOrEmpty(result.ID) || // proxyPayStatus.REG_COUNT < 3) //{ // this.ViewBag.ShowAddButton = true; //} //else //{ // this.ViewBag.ShowAddButton = false; //} // 取得全資料 InitOutput initOutput = await homeService.INIT(result.ID); // 加入Cookie System.Web.HttpCookie AridCookie = this.AirdCookie(result.ID ?? string.Empty, MbrId, DevId, Token, initOutput?.CUST_ID ?? string.Empty, initOutput?.CNTRT_NO ?? string.Empty); this.Response.Cookies.Add(AridCookie); } this.ViewBag.Title = "我的帳單"; return(this.View()); }