public ACREQUEST GetFCUBSAcInfo(string TId, string CustNo, string AcNo) { var Result = new ACREQUEST(); var userStatus = dbContext.APPUSERLOGs.FirstOrDefault(t => t.Token == TId.Trim()); try { if (userStatus != null) { Result = oFCUBSACCServiceLayer.QueryAccSummary(CustNo, AcNo); Result.STATUS = true; Result.REQMSG = Result.ACLIST.ToList().Count.ToString(); } else { Result.STATUS = false; Result.REQMSG = SystemMessage.MSG_INVALID_TOKEN; } } catch (Exception ex) { Result.STATUS = false; Result.REQMSG = (ex.InnerException != null) ? ex.Message : ex.InnerException.Message; } return(Result); }
public ACREQUEST QueryCustomerSummary(string CustomerNo) { var result_acInfo = new ACREQUEST(); FCUBSACCServiceConnectionOpen(); oQUERYACCSUMM_IOFS_REQ.FCUBS_HEADER = new FCUBS_HEADERType(); oQUERYACCSUMM_IOFS_REQ.FCUBS_HEADER.SOURCE = "RTGS"; oQUERYACCSUMM_IOFS_REQ.FCUBS_HEADER.UBSCOMP = UBSCOMPType.FCUBS; oQUERYACCSUMM_IOFS_REQ.FCUBS_HEADER.USERID = "RTGS"; oQUERYACCSUMM_IOFS_REQ.FCUBS_HEADER.BRANCH = "000"; oQUERYACCSUMM_IOFS_REQ.FCUBS_HEADER.MODULEID = "ST"; oQUERYACCSUMM_IOFS_REQ.FCUBS_HEADER.SERVICE = "FCUBSAccService"; oQUERYACCSUMM_IOFS_REQ.FCUBS_HEADER.OPERATION = "QueryAccSumm"; oQUERYACCSUMM_IOFS_REQ.FCUBS_HEADER.SOURCE_OPERATION = "QueryAccSumm"; //oQUERYACCSUMM_IOFS_REQ.FCUBS_HEADER.MSGSTAT = MsgStatType.SUCCESS; oQUERYACCSUMM_IOFS_REQ.FCUBS_BODY = new QUERYACCSUMM_IOFS_REQFCUBS_BODY(); oQUERYACCSUMM_IOFS_REQ.FCUBS_BODY.StvwAccountSumaryIO = new QueryAccSummQueryIOType(); oQUERYACCSUMM_IOFS_REQ.FCUBS_BODY.StvwAccountSumaryIO.CUST_NO = CustomerNo; QueryAccSummIORequest oQueryAccSummIORequest = new QueryAccSummIORequest(oQUERYACCSUMM_IOFS_REQ); try { oQUERYACCSUMM_IOFS_RES = new QUERYACCSUMM_IOFS_RES(); //oQUERYACCSUMM_IOFS_RES.FCUBS_BODY = new QUERYACCSUMM_IOFS_RESFCUBS_BODY(); //oQUERYACCSUMM_IOFS_RES.FCUBS_BODY.FCUBS_ERROR_RESP=new ERRORDETAILSType[0][]; oQUERYACCSUMM_IOFS_RES = oFCUBSAccServiceSEIClient.QueryAccSummIO(oQUERYACCSUMM_IOFS_REQ); FCUBSACCServiceConnectionClose(); QueryAccSummFullTypeStvwAccountSumaryA oQueryAccSummFullTypeStvwAccountSumaryA = new QueryAccSummFullTypeStvwAccountSumaryA(); result_acInfo.ACLIST = new List <USERACINFO>(); foreach (QueryAccSummFullTypeStvwAccountSumaryA response in oQUERYACCSUMM_IOFS_RES.FCUBS_BODY.StvwAccountSumaryFull.StvwAccountSumaryA.ToList()) { var oAc = new USERACINFO(); var oCustACBal = QueryAccBalIO(response.CUSTACNO); if (oCustACBal != null) { oAc.ACAVAILBAL = oCustACBal.FCUBS_BODY.ACCBalance.ElementAt(0).AVLBAL; oAc.ACCURRENTBAL = oCustACBal.FCUBS_BODY.ACCBalance.ElementAt(0).CURBAL; } oAc.ACNAME = response.CUSTOMER_NAME; oAc.CUSTNO = CustomerNo; oAc.ACNO = response.CUSTACNO; oAc.ACTYPE = GetAccountTypeName(response.ACCOUNT_TYPE); result_acInfo.ACLIST.Add(oAc); } result_acInfo.CUSTOMERNO = CustomerNo; } catch (Exception exp) { FCUBSACCServiceConnectionClose(); } return(result_acInfo); }