public bool EliminarCliente(int IdCliente, out string mensaje) { ClienteDA objClienteDA = new ClienteDA(); try { using (TransactionScope transaccion = new TransactionScope(TransactionScopeOption.Required)) { if (objClienteDA.EliminarCliente(IdCliente, out mensaje)) { transaccion.Complete(); return(true); } else { transaccion.Dispose(); return(false); } } } catch (Exception ex) { throw ex; } }
public IActionResult Delete(Cliente cliente) { var da = new ClienteDA(); if (da.EliminarCliente(cliente.idCliente)) { return(RedirectToAction("index")); } else { return(View(cliente)); } }
public bool EliminarCliente(string IdCliente) { ClienteDA objClienteDA = new ClienteDA(); try { if (objClienteDA.EliminarCliente(IdCliente)) { return(true); } else { return(false); } } catch (Exception ex) { throw ex; } }
public int EliminarCliente(int ID) { return(clienteDA.EliminarCliente(ID)); }
public int EliminarCliente(int cl) { return(da.EliminarCliente(cl)); }
public int EliminarCliente(ClienteCLS objClienteCls) { return(obj.EliminarCliente(objClienteCls)); }