Exemple #1
0
        public void DeleteEmpleadoTest_Ok()
        {
            var data     = new EmpleadoData();
            var empleado = new Empleado(1, "Empleado 1", "1222", "Admin", true, 1);
            var resrult  = data.Delete(empleado.EmpId);

            Assert.IsNotNull(resrult);
        }
Exemple #2
0
 /// <summary>
 /// ELIMINA un registro de la Entidad Almacen.EmpleadoAux
 /// En la BASE de DATO la Tabla : [Almacen.EmpleadoAux]
 /// <summary>
 /// <returns>bool</returns>
 public ReturnValor Delete(int pcodEmpresa, int pcodEmpleado, string pUser, string pMaquina)
 {
     try
     {
         using (TransactionScope tx = new TransactionScope(TransactionScopeOption.Required))
         {
             returnValor.Exitosa = empleadoData.Delete(pcodEmpresa, pcodEmpleado, pUser, pMaquina);
             if (returnValor.Exitosa)
             {
                 returnValor.Message = HelpEventos.MessageEvento(HelpEventos.Process.DELETE);
                 tx.Complete();
             }
         }
     }
     catch (Exception ex)
     {
         returnValor = HelpException.mTraerMensaje(ex, false,
                                                   string.Concat(GetType().Name, ".", MethodBase.GetCurrentMethod().Name),
                                                   pUser, pcodEmpresa.ToString());
     }
     return(returnValor);
 }
        public int Eliminar(int id)
        {
            var data = new EmpleadoData();

            return(data.Delete(id));
        }