public JsonResult SearchCardDetail(string CardNo) { CardTypesDataAccess obj = new CardTypesDataAccess(); List <CustomerAccountVM> lst = new List <CustomerAccountVM>(); NewCISSB.SONFETCHCARDINFOTypeGSONFETCHCARDINFODetailTypeMSONFETCHCARDINFODetailType resp = new NewCISSB.SONFETCHCARDINFOTypeGSONFETCHCARDINFODetailTypeMSONFETCHCARDINFODetailType(); lst = CardReportMethods.GetCustomerAccount(CardNo); if (lst.Count <= 0) { return(Json(new { Result = lst, ErrorMessage = CustomMessages.CardNotExists }, JsonRequestBehavior.AllowGet)); } else { var request = new RequestDataAccess().GetRequest(CardNo, lst.FirstOrDefault()?.AccountNo ?? string.Empty, lst.FirstOrDefault()?.CIF ?? string.Empty); var requestdata = new RequestVM { ID = request?.ID ?? 0, RequestType = request?.RequestType ?? string.Empty, Waive = request != null?request.WaiveCharges.GetValueOrDefault() : false }; var userlog = new UserLogDataAccess().GetUserLogByEntityId(request?.ID ?? 0, "tbl_Requests"); var creator = userlog.Where(e => e.EventName == "i").FirstOrDefault()?.tbl_Users?.UserName ?? string.Empty; var authorizer = userlog.Where(e => e.EventName == "A").OrderByDescending(e => e.ID).FirstOrDefault()?.tbl_Users?.UserName ?? string.Empty; try { resp = T24Methods.FetchAccount(lst.FirstOrDefault()?.AccountNo ?? string.Empty, lst.FirstOrDefault()?.CIF ?? string.Empty); } catch { resp = new NewCISSB.SONFETCHCARDINFOTypeGSONFETCHCARDINFODetailTypeMSONFETCHCARDINFODetailType(); } //var CardIssuance = lst.FirstOrDefault().CardIssuance.ToString(); //var CardExpiry = lst.FirstOrDefault().CardExpiry.ToString(); //var DOB = lst.FirstOrDefault().DateofBirth.ToString(); var CardTypes = obj.GetCardTypes("A"); CardTypes = (CardTypes.Where(s => s.ID == (lst.FirstOrDefault()?.CardTypeID ?? 0))).ToList(); var CardType = (CardTypes.Count > 0) ? CardTypes[0].Title : string.Empty; List <CustomerAccountVM> DelinkInfo = new List <CustomerAccountVM>(); //DelinkInfo = CommonMethods.GetAccountInfo(CardNo, lst.FirstOrDefault()?.AccountNo ?? "0"); var DelinkInfoStr = CommonMethods.GetLinkedAccounts(CardNo, lst.FirstOrDefault()?.AccountNo ?? "0"); var Product = new AccountTypeDataAccess().GetAccountTypeById(lst.FirstOrDefault().AccountTypeID ?? 0)?.Name ?? string.Empty; return(Json(new { Result = lst, /*CardIssuance=CardIssuance, CardExpiry= CardExpiry,DOB=DOB,*/ DelinkInfoStr = DelinkInfoStr, CardType = CardType, Product = Product, Request = requestdata, AccountResponse = resp, Creator = creator, Authorizer = authorizer, ErrorMessage = CustomMessages.Success }, JsonRequestBehavior.AllowGet)); } }
public static NewCISSB.SONFETCHCARDINFOTypeGSONFETCHCARDINFODetailTypeMSONFETCHCARDINFODetailType FetchAccount(string AccountNo, string CIF) { try { //UAT url:http://10.35.1.154:9121/SON.CARD.OPS/services?wsdl //dress reh url: http://10.20.206.25:9091/SON.CARD.OPS/services //prod url: http://10.20.206.25:9091/SON.CARD.OPS/services?wsdl //UAT 1 url: http://10.35.1.154:9092/SON.CARD.OPS/services?wsdl NewCISSB.webRequestCommon header = new NewCISSB.webRequestCommon(); header.company = "PK0029001"; //Credentials header.userName = ConfigurationManager.AppSettings["UserFetch"]; //header.password = EncryptDecrypt.Decrypt(ConfigurationManager.AppSettings["PassFetch"].ToString()); header.password = ConfigurationManager.AppSettings["PassFetch"].ToString(); NewCISSB.T24WebServicesImplService service = new NewCISSB.T24WebServicesImplService(); NewCISSB.SONFETCHCARDINFOTypeGSONFETCHCARDINFODetailTypeMSONFETCHCARDINFODetailType response = new NewCISSB.SONFETCHCARDINFOTypeGSONFETCHCARDINFODetailTypeMSONFETCHCARDINFODetailType(); if (!string.IsNullOrEmpty(AccountNo) && !string.IsNullOrEmpty(CIF)) { NewCISSB.SONFETCHCARDINFOType[] SONFETCHCARDINFOType1 = new NewCISSB.SONFETCHCARDINFOType[2]; NewCISSB.enquiryInputCollection[] enqcollection = new NewCISSB.enquiryInputCollection[2]; NewCISSB.enquiryInputCollection enq = new NewCISSB.enquiryInputCollection(); enq.columnName = "ACCT.ID"; enq.criteriaValue = AccountNo.Trim();//"20000024679"; enq.operand = "EQ"; NewCISSB.enquiryInputCollection enq1 = new NewCISSB.enquiryInputCollection(); enq1.columnName = "CUST.ID"; enq1.criteriaValue = CIF.Trim();//"1000109118"; enq1.operand = "EQ"; enqcollection[0] = enq; enqcollection[1] = enq1; var results = service.CARDOPS(header, enqcollection, out SONFETCHCARDINFOType1); response = SONFETCHCARDINFOType1[0].gSONFETCHCARDINFODetailType.mSONFETCHCARDINFODetailType[1]; } return(response); } catch (Exception ex) { throw ex; } }
public static NewCISSB.SONFETCHCARDINFOTypeGSONFETCHCARDINFODetailTypeMSONFETCHCARDINFODetailType FetchAccount1(string AccountNo, string CIF) { try { NewCISSB.webRequestCommon header = new NewCISSB.webRequestCommon(); header.company = "PK0029001"; header.userName = "******"; header.password = "******"; NewCISSB.T24WebServicesImplService service = new NewCISSB.T24WebServicesImplService(); NewCISSB.SONFETCHCARDINFOTypeGSONFETCHCARDINFODetailTypeMSONFETCHCARDINFODetailType response = new NewCISSB.SONFETCHCARDINFOTypeGSONFETCHCARDINFODetailTypeMSONFETCHCARDINFODetailType(); if (!string.IsNullOrEmpty(AccountNo) && !string.IsNullOrEmpty(CIF)) { NewCISSB.SONFETCHCARDINFOType[] SONFETCHCARDINFOType1 = new NewCISSB.SONFETCHCARDINFOType[2]; NewCISSB.enquiryInputCollection[] enqcollection = new NewCISSB.enquiryInputCollection[2]; NewCISSB.enquiryInputCollection enq = new NewCISSB.enquiryInputCollection(); enq.columnName = "ACCT.ID"; enq.criteriaValue = AccountNo.Trim();//"20000024679"; enq.operand = "EQ"; NewCISSB.enquiryInputCollection enq1 = new NewCISSB.enquiryInputCollection(); enq1.columnName = "CUST.ID"; enq1.criteriaValue = CIF.Trim();//"1000109118"; enq1.operand = "EQ"; enqcollection[0] = enq; enqcollection[1] = enq1; var results = service.CARDOPS(header, enqcollection, out SONFETCHCARDINFOType1); response = SONFETCHCARDINFOType1[0].gSONFETCHCARDINFODetailType.mSONFETCHCARDINFODetailType[1]; } return(response); } catch (Exception ex) { throw ex; } }