public List <object> getCELS() { try { CEL cel = new CEL(); List <object> lstCEL = UTILS.GET("private/cel", "cel", AuthUser.token, cel.GetType()); if (lstCEL == null || lstCEL.Count == 0) { return(null); } return(lstCEL); } catch (Exception) { return(null); } }
public CEL guardarCEL(CEL cel) { try { List <Object> c = UTILS.POST("private/cel", "cel", AuthUser.token, cel.GetType(), cel); if (c == null || c.Count == 0) { return(null); } return((CEL)c[0]); } catch (Exception) { return(null); } }
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); }