Exemple #1
0
 public List <FCCxCConcepto> DATOS_SelectAll()
 {
     try
     {
         using (bd = new bdFCCxCEntities())
         {
             var resTemp1             = bd.pr_FCCxCConcepto_SeleccionarTodos(new ObjectParameter("iCodError", "0")).ToList();
             List <FCCxCConcepto> res = new List <FCCxCConcepto>();
             foreach (var t in resTemp1)
             {
                 var n = new FCCxCConcepto()
                 {
                     IdConcepto = t.IdConcepto,
                     DscTipo    = t.DscTipo
                 };
                 res.Add(n);
             }
             return(res);
         }
     }
     catch (Exception ex)
     {
         //var msgError = ex.Message;
         throw ex;
     }
     //return null;
 }
Exemple #2
0
 public bool DATOS_insertar(FCCxCConcepto obj)
 {
     try
     {
         var resultado = bd.pr_FCCxCConcepto_Insertar(obj.DscTipo, obj.CodEstado, obj.CtaFinancieraDebito, obj.CtaFinancieraCredito, obj.UsarExpiracion,
                                                      obj.NumDiasExpira, obj.EnviaNotificacion, new ObjectParameter("iIdConcepto", "0"), new ObjectParameter("iCodError", "0"));
         return(resultado == 1); //lo mismo que decir: if resultado == 1 { return true } else { return false }
     }
     catch (Exception ex)
     {
         var msgError = ex.Message;
         return(false);
     }
 }
 public FCCxCAuxiliar DATOS_Select(int id)
 {
     try
     {
         FCCxCAuxiliar res      = null;  //inicialmente nulo
         var           resTemp1 = bd.pr_FCCxCAuxiliar_SeleccionarUno(id, new ObjectParameter("iCodError", "0")).ToList();
         if (resTemp1 != null)
         {
             res = new FCCxCAuxiliar();  //si lo encontró lo asigna al resultado
             var n = new FCCxCConcepto()
             {
                 IdConcepto = res.IdAuxiliar,
                 DscTipo    = res.DscAuxiliar
             };
         }
         return(res);                     //retorna el resultado
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #4
0
 public FCCxCConcepto DATOS_Select(int id)
 {
     try
     {
         FCCxCConcepto res      = null;  //inicialmente nulo
         var           resTemp1 = bd.pr_FCCxCConcepto_SeleccionarUno(id, new ObjectParameter("iCodError", "0")).ToList();
         if (resTemp1 != null)
         {
             res = new FCCxCConcepto();  //si lo encontró lo asigna al resultado
             var n = new FCCxCConcepto()
             {
                 IdConcepto = resTemp1[0].IdConcepto,
                 DscTipo    = resTemp1[0].DscTipo
             };
         }
         return(res);                     //retorna el resultado
     }
     catch (Exception ex)
     {
         //var msgError = ex.Message;
         throw ex;
     }
     //return null;
 }