public StudentVO(DataRow row)
        {
            StudentId = ("" + row["student_id"]).Trim();
            StudentName = ("" + row["student_name"]).Trim();
            StudentIdNumber = ("" + row["student_idnumber"]).Trim();
            StudentBirthday = Utility.ConvertStringToDateTime(("" + row["student_birthday"]).Trim());
            StudentTagId.Add(("" + row["ref_tag_id"]).Trim());

            ClassGradeYear = ("" + row["class_grade_year"]).Trim();
            ClassDisplayOrder = ("" + row["class_display_order"]).Trim();
            ClassName = ("" + row["class_name"]).Trim();
            StudentSeatNo = ("" + row["student_seat_no"]).Trim();
            StudentNumber = ("" + row["student_number"]).Trim();

            ItemList = new Dictionary<string,decimal>();
            DetailItemList = new Dictionary<string, Dictionary<string, DetailItemVO>>();

            for (int intI=0; intI<Global.ItemNameList.Length; intI++)
            {
                string itemName = Global.ItemNameList[intI];
                ItemList.Add(itemName, 0);

                if (!DetailItemList.ContainsKey(itemName))
                    DetailItemList.Add(itemName, new Dictionary<string, DetailItemVO>());

                Dictionary<string, DetailItemVO> objList = DetailItemList[itemName];
                for (int intJ = 0; intJ < Global.DetailItemNameList[intI].Length; intJ++)
                {
                    DetailItemVO detailItemVO = new DetailItemVO();
                    detailItemVO.Name = Global.DetailItemNameList[intI][intJ];
                    detailItemVO.Points = 0;
                    objList.Add(detailItemVO.Name, detailItemVO);
                }
            }
        }
Exemplo n.º 2
0
        public StudentVO(DataRow row)
        {
            StudentId       = ("" + row["student_id"]).Trim();
            StudentName     = ("" + row["student_name"]).Trim();
            StudentIdNumber = ("" + row["student_idnumber"]).Trim();
            StudentBirthday = Utility.ConvertStringToDateTime(("" + row["student_birthday"]).Trim());
            StudentTagId.Add(("" + row["ref_tag_id"]).Trim());

            ClassGradeYear    = ("" + row["class_grade_year"]).Trim();
            ClassDisplayOrder = ("" + row["class_display_order"]).Trim();
            ClassName         = ("" + row["class_name"]).Trim();
            StudentSeatNo     = ("" + row["student_seat_no"]).Trim();
            StudentNumber     = ("" + row["student_number"]).Trim();

            ItemList       = new Dictionary <string, decimal>();
            DetailItemList = new Dictionary <string, Dictionary <string, DetailItemVO> >();

            for (int intI = 0; intI < Global.ItemNameList.Length; intI++)
            {
                string itemName = Global.ItemNameList[intI];
                ItemList.Add(itemName, 0);

                if (!DetailItemList.ContainsKey(itemName))
                {
                    DetailItemList.Add(itemName, new Dictionary <string, DetailItemVO>());
                }

                Dictionary <string, DetailItemVO> objList = DetailItemList[itemName];
                for (int intJ = 0; intJ < Global.DetailItemNameList[intI].Length; intJ++)
                {
                    DetailItemVO detailItemVO = new DetailItemVO();
                    detailItemVO.Name   = Global.DetailItemNameList[intI][intJ];
                    detailItemVO.Points = 0;
                    objList.Add(detailItemVO.Name, detailItemVO);
                }
            }
        }