public List <CatalogInfoModel> GetTeacherStudents(int courseId, String studySet, String studentName, String studyGroup)
        {
            DATeachers da = new DATeachers();
            DataTable  dt = da.GetTeacherStudents(courseId, studySet, studentName, studyGroup);

            List <CatalogInfoModel> list = new List <CatalogInfoModel>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                CatalogInfoModel catalogInfo = new CatalogInfoModel();
                catalogInfo.EntryId = Convert.ToInt32(dt.Rows[i]["EntryId"]);
                catalogInfo.Student = new StudentsModel
                {
                    StudentId   = Convert.ToInt32(dt.Rows[i]["StudentId"]),
                    StudentName = dt.Rows[i]["StudentName"].ToString(),
                    StudyGroup  = dt.Rows[i]["StudyGroup"].ToString()
                };
                catalogInfo.Laboratory  = Convert.ToInt32(dt.Rows[i]["Laboratory"]);
                catalogInfo.Seminary    = Convert.ToInt32(dt.Rows[i]["Seminary"]);
                catalogInfo.PartialExam = Convert.ToInt32(dt.Rows[i]["PartialExam"]);
                catalogInfo.FinalExam   = Convert.ToInt32(dt.Rows[i]["FinalExam"]);
                catalogInfo.BonusPoints = Convert.ToInt32(dt.Rows[i]["BonusPoints"]);
                catalogInfo.Total       = Convert.ToInt32(dt.Rows[i]["Total"]);
                catalogInfo.LastUpdate  = dt.Rows[i]["LastUpdate"].ToString();

                list.Add(catalogInfo);
            }
            return(list);
        }
Example #2
0
 public ICatalogJob Convert(ICatalogJob catalogJobInfo)
 {
     CatalogInfoModel model = new CatalogInfoModel()
     {
         CatalogJobName = catalogJobInfo.CatalogJobName,
         Organization = catalogJobInfo.Organization,
         StartTime = this.StartTime
     };
     return model;
 }