public static ContactoBean InsertContact(String NombreC, String TelefonoC, String EmailC, String CargoC, String idclienteC, String codInstalacion) { try { //String idZona = HttpContext.Current.Session["lgn_idzona"].ToString(); ContactoBean item = new ContactoBean { Nombre = NombreC, Telefono = TelefonoC, Email = EmailC, Cargo = CargoC, IdCliente = Int64.Parse(idclienteC), codInstalacion = codInstalacion }; ContactoController.Insert(item); return(item); } catch (Exception ex) { LogHelper.LogException(ex, "Error: Insert"); throw new Exception("ERROR: " + ex.Message); } }
public static String Insert(string Nombre, string Telefono, string Email, string Cargo, int IdCliente, string codInstalacion) { try { var item = new ContactoBean { Nombre = Nombre, Telefono = Telefono, Email = Email, Cargo = Cargo, IdCliente = IdCliente, codInstalacion = codInstalacion //IdZona = IdZona }; ContactoController.Insert(item); return("OK"); } catch (Exception ex) { LogHelper.LogException(ex, "Error :Contacto_Insert : "); throw new Exception("ERROR: " + ex.Message); } }