Exemple #1
0
        //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");
     }
 }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
 public RemoteController()
 {
     _peopleClient = ServiceProxy.Create <IBusinessClient>(BusinessService.Uri);
 }
Exemple #6
0
 public BusinessController(IDispatcher dispatcher, IBusinessClient client, HttpClientOptions options, IVmsLogger <GatewayControllerBase> logger) : base(dispatcher, options, logger)
 {
     _client = client;
 }