public SalesController() { categoriesB = new CategoriesB(); subCategoriesB = new SubCategoriesB(); accountB = new AccountsB(); userB = new UsersB(); saleB = new SalesB(); assetsLiabilitiesB = new AssetsLiabilitiesB(); clientsB = new ClientsB(); productsB = new ProductsB(); detailsB = new DetailsB(); invoicesB = new InvoicesB(); providersB = new ProvidersB(); }
public IHttpActionResult GetName(String name) { IList <All_Clients> clients = null; ClientsB clientB = new ClientsB(); clients = clientB.GetByName(name); if (clients == null) { return(Ok(false)); } return(Ok(clients)); }
// GET: api/Client/5 public IHttpActionResult Get(int id) { All_Clients clients = null; ClientsB clientB = new ClientsB(); clients = clientB.GetById(id); if (clients == null) { return(Ok(false)); } return(Ok(clients)); }
// GET: api/Client public IHttpActionResult Get() { IList <All_Clients> clients = null; ClientsB clientB = new ClientsB(); clients = clientB.GetAll(); if (clients == null) { return(Ok(false)); } return(Ok(clients)); }
public IHttpActionResult Post(Persons persons) { int clients; ClientsB clientB = new ClientsB(); clients = clientB.Create(persons); switch (clients) { case 200: return(Ok(200)); case 400: return(Ok(400)); case 500: return(Ok(500)); default: return(Ok(false)); } }
public ClientsController() { clientsB = new ClientsB(); providersB = new ProvidersB(); personsB = new PersonsB(); }