public void GetCustomerFromSData(string customerNumber) { // dch rkl 12/07/2016 catch exception try { List <AR_Customer> customers = _sDataClient.GetData <AR_Customer>("where", @"CustomerNo eq '" + customerNumber + @"'"); if (customers.Count == 0) { customers.Add(new AR_Customer()); customers[0].ARDivisionNo = "000000"; customers[0].CustomerNo = "999999"; customers[0].CustomerName = "FAKE SDATA CUSTOMER"; customers[0].TelephoneNo = "717-555-1212"; customers[0].TelephoneExt = "123"; } Customer = customers[0]; } catch (Exception ex) { // dch rkl 12/07/2016 Log Error ErrorReporting errorReporting = new ErrorReporting(); errorReporting.sendException(ex, "TechDashboard.TestPageViewModel.GetCustomerFromSData"); } }
public void GetCustomerFromSData(string customerNumber) { List <AR_Customer> customers = _sDataClient.GetData <AR_Customer>("where", @"CustomerNo eq '" + customerNumber + @"'"); if (customers.Count == 0) { customers.Add(new AR_Customer()); customers[0].ARDivisionNo = "000000"; customers[0].CustomerNo = "999999"; customers[0].CustomerName = "FAKE SDATA CUSTOMER"; customers[0].TelephoneNo = "717-555-1212"; customers[0].TelephoneExt = "123"; } Customer = customers[0]; }
protected List <T> GetData <T>(string filterType, string filterText) { // dch rkl 01/30/2017 Decode filter text if (filterText.Trim().Length > 0) { filterText = System.Web.HttpUtility.UrlDecode(filterText); } SDataClient myClient = new SDataClient( _isUsingHttps, _sDataUrl, _userId, _password ); if ((filterType == null) || (filterType.ToLower().Trim() == "all")) { filterType = string.Empty; filterText = string.Empty; } return(myClient.GetData <T>(filterType, filterText)); }