public ActionResult Edit(SupplierViewModel SUP) { SupplierClient CC = new SupplierClient(); CC.Edit(SUP.supplier); return(RedirectToAction("GetSuppliers")); }
public ActionResult Delete(string id) { SupplierClient CC = new SupplierClient(); CC.Delete(id); return(RedirectToAction("GetSuppliers")); }
public ActionResult Edit(string id) { SupplierClient CC = new SupplierClient(); SupplierViewModel SUP = new SupplierViewModel(); SUP.supplier = CC.find(id); return(View("Edit", SUP)); }
public ActionResult Create(SupplierViewModel sup) { SupplierClient CC = new SupplierClient(); CC.Create(sup.supplier); return(RedirectToAction("GetSuppliers")); }
// GET: SUPPLIERs public ActionResult GetSuppliers() { SupplierClient CC = new SupplierClient(); ViewBag.listSupplier = CC.findAll(); return(View()); }
public ConsumeController(SupplierClient supplierClient) { this.supplierClient = supplierClient; }
/// <summary> /// Gets the WFM Service Configured based on your requirements /// </summary> /// <param name="serviceType">The Service Type Required ("Client", "Contact" ...)</param> /// <returns>The Service, fully populated</returns> public static Object GetWcfSvc(string serviceType) { Uri serviceUri; EndpointAddress endpointAddress; var binding = BindingFactory.CreateInstance(); object service = null; string serviceBase = "http://modernpractice2013.cloudapp.net"; if (DefaultRegion == "NZ") { serviceBase = "http://modernpractice2013-nz.cloudapp.net"; } //serviceBase = "http://localhost:56019"; switch (serviceType) { case "Client": serviceUri = new Uri(serviceBase + "/ClientService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new ClientClient(binding, endpointAddress); break; case "Contact": serviceUri = new Uri(serviceBase + "/ContactService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new ContactClient(binding, endpointAddress); break; case "CustomField": serviceUri = new Uri(serviceBase + "/CustomFieldDefinitionService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new CustomFieldDefinitionClient(binding, endpointAddress); break; case "Invoice": serviceUri = new Uri(serviceBase + "/InvoiceService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new InvoiceClient(binding, endpointAddress); break; case "Job": serviceUri = new Uri(serviceBase + "/JobService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new JobClient(binding, endpointAddress); break; case "Lead": serviceUri = new Uri(serviceBase + "/LeadService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new LeadClient(binding, endpointAddress); break; case "Quote": serviceUri = new Uri(serviceBase + "/QuoteService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new QuoteClient(binding, endpointAddress); break; case "Task": serviceUri = new Uri(serviceBase + "/TaskService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new TaskClient(binding, endpointAddress); break; case "Staff": serviceUri = new Uri(serviceBase + "/StaffService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new StaffClient(binding, endpointAddress); break; case "Template": serviceUri = new Uri(serviceBase + "/TemplateService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new TemplateClient(binding, endpointAddress); break; case "Cost": serviceUri = new Uri(serviceBase + "/CostService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new CostClient(binding, endpointAddress); break; case "Supplier": serviceUri = new Uri(serviceBase + "/SupplierService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new SupplierClient(binding, endpointAddress); break; case "PurchaseOrder": serviceUri = new Uri(serviceBase + "/PurchaseOrderService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new PurchaseOrderClient(binding, endpointAddress); break; case "Time": serviceUri = new Uri(serviceBase + "/TimeService.svc"); endpointAddress = new EndpointAddress(serviceUri); service = new SupplierClient(binding, endpointAddress); break; } return(service); }
public void test_supplier_client_connection() { SupplierClient proxy = new SupplierClient(); proxy.Open(); }