/// <summary> /// /// </summary> /// <param name="idsubject"></param> /// <returns></returns> public static Subject GetSujetByID(int idsubject) { DataTable dt = SubjectDAO.GetSujetByID(idsubject); if (dt.Rows.Count == 1) { DataRow row = dt.Rows[0]; Subject subject = new Subject(int.Parse(row["ID_SUBJECT"].ToString()), row["SUBJECT_TITLE"].ToString(), row["SUBJECT_DESCRIPTION"].ToString(), DateTime.Parse(row["SUBJECT_DATE"].ToString()), GetUserByID(int.Parse(row["ID_UTILISATEUR"].ToString())), GetRubricByID(int.Parse(row["ID_RUBRIC"].ToString()))); return(subject); } return(null); }