Example #1
0
        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));
            }
        }
Example #3
0
        public bool EliminarCliente(string IdCliente)
        {
            ClienteDA objClienteDA = new ClienteDA();

            try
            {
                if (objClienteDA.EliminarCliente(IdCliente))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #4
0
 public int EliminarCliente(int ID)
 {
     return(clienteDA.EliminarCliente(ID));
 }
 public int EliminarCliente(int cl)
 {
     return(da.EliminarCliente(cl));
 }
Example #6
0
 public int EliminarCliente(ClienteCLS objClienteCls)
 {
     return(obj.EliminarCliente(objClienteCls));
 }