//ServiceFactory factory = ServiceFactory.GetInstance(); public void StoreNewBusinessClient(BusinessClient bc) { try { IBusinessClient bcSvc = (IBusinessClient)GetService(typeof(IBusinessClient).Name); bcSvc.StoreBusinessClient(bc); } catch (InterfaceNotFoundException) { throw new Exception("Submission failed. Try again."); } }
public void DeleteBusinessClient(BusinessClient bc) { try { IBusinessClient bcSvc = (IBusinessClient)GetService(typeof(IBusinessClient).Name); bcSvc.DeleteBusinessClient(bc); } catch (InterfaceNotFoundException) { throw new Exception("Delete failed. Try again"); } }
public BusinessClient RetrieveBusinessClient(BusinessClient bc) { try { IBusinessClient bcSvc = (IBusinessClient)GetService(typeof(IBusinessClient).Name); BusinessClient getBc = bcSvc.GetBusinessClient(bc); bc = getBc; } catch (ImplementationNotFoundException) { throw new Exception("Submission failed. Try again."); } return(bc); }
public void GetBusinessClientTest() { BusinessClient bc = new BusinessClient(); bc.CompanyName = "Google"; bc.PointOfContact = "John Doe"; bc.Address1 = "2342 Google Dr."; bc.Address2 = "Suite 2013"; bc.City = "Mountain View"; bc.State = "CA"; bc.Zip = "93445"; bc.Phone = "312-222-3244"; bc.Email = "*****@*****.**"; IBusinessClient iBC = new BusinessClientImpl(); iBC.GetBusinessClient(bc); IBusinessClient actualBC = iBC; Assert.AreEqual(iBC, actualBC); }
public RemoteController() { _peopleClient = ServiceProxy.Create <IBusinessClient>(BusinessService.Uri); }
public BusinessController(IDispatcher dispatcher, IBusinessClient client, HttpClientOptions options, IVmsLogger <GatewayControllerBase> logger) : base(dispatcher, options, logger) { _client = client; }