private void istCliente_Vendor(Cliente_vendor o) { try { CatalogCtrl.Cliente_vendorAdd(o); } catch { throw; } }
private string clienteVendor(HttpContext context) { string response = string.Empty; string option = context.Request["opt"].ToString(); string key = string.Empty; switch (option) { case "autoComplete": key = context.Request["w"].ToString(); response = CatalogCtrl.ToCSV((CatalogCtrl.Cliente_vendorfillByName(key)).Cast <Object>().ToList()); break; case "Add": jsonData = new StreamReader(context.Request.InputStream).ReadToEnd(); Cliente_vendor oCV = JsonConvert.DeserializeObject <Cliente_vendor>(jsonData); CatalogCtrl.Cliente_vendorAdd(oCV); response = JsonConvert.SerializeObject("Se guardo correctamente el registro"); break; } return(response); }