public async Task <List <HocPhanExtend> > getListUnRegistableAsync()
        {
            try
            {
                List <HocPhanExtend> listHocPhan = new List <HocPhanExtend>();
                BaseConnector        connector   = BaseConnector.getInstance();
                BaseResponse         res         = await connector.GetObject(DeployEnvironment.GetEnvironment().GetUnEnrolablePath());

                if (res.status)
                {
                    JsonAttributes jsonAttr = JsonAttributeGetter.GetJsonAttributes();
                    List <Object>  listO    = JsonGetter.getList(res.obj.ToString(), jsonAttr.RES_RESULT());
                    for (int i = 0; i < listO.Count; i++)
                    {
                        HocPhanExtend hocPhan = new HocPhanExtend()
                        {
                            hocPhan = HocPhan.Parse(JsonGetter.getObject(listO[i].ToString(), jsonAttr.RES_SUBJECT())),
                            lyDo    = JsonGetter.getString(listO[i].ToString(), jsonAttr.RES_REASON())
                        };
                        listHocPhan.Add(hocPhan);
                    }
                }
                return(listHocPhan);
            }
            catch (Exception ex)
            {
                LogHelper.Log("ERROR: " + ex);
                return(null);
            }
        }
Exemple #2
0
 public async Task <SinhVien> GetSinhVienDetailAsync()
 {
     try
     {
         BaseConnector connector = BaseConnector.getInstance();
         sv.GetDataFromObject((await connector.GetObject(DeployEnvironment.GetEnvironment().GetStudentInfoPath(sv.mssv))).obj);
         return(sv);
     }
     catch (Exception ex)
     {
         LogHelper.Log("ERROR: " + ex);
         return(null);
     }
 }