Esempio n. 1
0
 public bool NEGOCIO_delete(int id)
 {
     try
     {
         var resultado = new DATOS_Maestro().DATOS_delete(id);
         return(resultado);
     }
     catch (Exception ex)
     {
         var msgError = ex.Message;
         return(false);
     }
 }
Esempio n. 2
0
 public bool NEGOCIO_update(FCCxCMaestro obj)
 {
     try
     {
         var resultado = new DATOS_Maestro().DATOS_update(obj);
         return(resultado);
     }
     catch (Exception ex)
     {
         var msgError = ex.Message;
         return(false);
     }
 }
Esempio n. 3
0
 public List <FCCxCMaestro> NEGOCIO_SelectAll()
 {
     try
     {
         var res = new DATOS_Maestro().DATOS_SelectAll().ToList();
         return(res);
     }
     catch (Exception ex)
     {
         var msgError = ex.Message;
     }
     return(null);
 }
Esempio n. 4
0
 public FCCxCMaestro NEGOCIO_Select(int id)
 {
     try
     {
         FCCxCMaestro res     = null;           //inicialmente es nulo
         var          resTemp = new DATOS_Maestro().DATOS_Select(id);
         //if (resTemp != null)
         //{
         res = resTemp;
         return(res);                             //lo retorna, sea nulo o el valor retornado por DAL
         //}
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 5
0
        public void Maestro_Get_DebeRetornarMismaCantidadCapaDatos()
        {
            //registros retornados por la capa de datos
            CxC.Datos.DATOS_Maestro obj = new DATOS_Maestro();
            var resCapaDatos            = obj.DATOS_SelectAll();

            //registros retornados por el API
            var controller = new MaestroController();

            var resApi = controller.Get() as List <FCCxCMaestro>;

            if (resApi == null && resCapaDatos == null)
            {
                Assert.AreEqual(0, 0, "Ambos son null");
            }
            else
            {
                Assert.AreEqual(resCapaDatos.Count, resApi.Count, "Cantidad NO es igual en ambos");
            }
        }