Beispiel #1
0
        public bool actualizarPrograma(ProgramaEstudio programa)
        {
            try
            {
                string        id   = programa.id_programa.ToString();
                List <Object> prog = UTILS.PUT("private/programa/" + id, "programa", AuthUser.token, programa.GetType(), programa);

                return(prog != null && prog.Count != 0);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Beispiel #2
0
        public List <object> GetProgramasEstudiosCEL()
        {
            ProgramaEstudio progEst      = new  ProgramaEstudio();
            List <object>   lstProgramas = UTILS.GET("private/programa", "programa", AuthUser.token, progEst.GetType());

            if (lstProgramas == null || lstProgramas.Count == 0)
            {
                return(null);
            }
            CEL           cl     = new CEL();
            List <object> lstCel = cl.getCELS();

            if (lstCel == null)
            {
                lstCel = new List <object>();
            }

            for (int i = 0; i < lstProgramas.Count; i++)
            {
                for (int j = 0; j < lstCel.Count; j++)
                {
                    CEL             c  = (CEL)lstCel[j];
                    ProgramaEstudio pg = (ProgramaEstudio)lstProgramas[i];
                    if (pg.id_cel.Equals(c.id_cel))
                    {
                        pg.cel          = c;
                        lstProgramas[i] = pg;
                        break;
                    }
                }
            }

            List <Object> arr = filtrarProgramas(lstProgramas);

            return(arr);
        }
Beispiel #3
0
 public List <object> GetProgramasEstudios()
 {
     try
     {
         ProgramaEstudio progEst      = new ProgramaEstudio();
         List <object>   lstProgramas = UTILS.GET("private/programa", "programa", AuthUser.token, progEst.GetType());
         if (lstProgramas == null || lstProgramas.Count == 0)
         {
             return(null);
         }
         return(lstProgramas);
     }
     catch (Exception)
     {
         return(null);
     }
 }