示例#1
0
        public static DangKyHocPhan Parse(Object o)
        {
            DangKyHocPhan  ans      = new DangKyHocPhan();
            JsonAttributes jsonAttr = JsonAttributeGetter.GetJsonAttributes();

            ans.diem    = Diem.Parse(JsonGetter.getObject(o.ToString(), jsonAttr.DKHP_D()));
            ans.hocPhan = HocPhan.Parse(JsonGetter.getObject(o.ToString(), jsonAttr.DKHP_HP()));
            return(ans);
        }
示例#2
0
        public static List <DangKyHocPhan> ParseArray(List <Object> o)
        {
            List <DangKyHocPhan> ans = new List <DangKyHocPhan>();

            for (int i = 0; i < o.Count; i++)
            {
                ans.Add(DangKyHocPhan.Parse(o[i]));
            }
            return(ans);
        }
示例#3
0
        // Parse and copy from object
        public void GetDataFromObject(Object o)
        {
            JsonAttributes jsonAttr = JsonAttributeGetter.GetJsonAttributes();
            Object         data     = JsonGetter.getObject(o.ToString(), jsonAttr.SV());

            this.id            = JsonGetter.getInt(data.ToString(), jsonAttr.SV_ID());
            this.mssv          = JsonGetter.getString(data.ToString(), jsonAttr.SV_MSSV());
            this.name          = JsonGetter.getString(data.ToString(), jsonAttr.SV_TEN());
            this.chuongTrinh   = JsonGetter.getString(data.ToString(), jsonAttr.SV_CHUONGTRINH());
            this.faculty       = JsonGetter.getString(data.ToString(), jsonAttr.SV_KHOA());
            this.khoaTuyen     = JsonGetter.getString(data.ToString(), jsonAttr.SV_KHOATUYEN());
            this.maxTC         = JsonGetter.getInt(data.ToString(), jsonAttr.SV_MAXTC());
            this.dangKyHocPhan = DangKyHocPhan.ParseArray(JsonGetter.getList(o.ToString(), jsonAttr.SV_DKHP()));
        }