public static List <STUDENT> GetActiveStudentsByClass(int qe_class) { string first = WillORM.QueryBuilder("STUDENT", "CLASS_STUDENT_LIST", new List <MutliQuery>() { new MutliQuery() { field1 = "QE_CLASS", field2 = qe_class.ToString(), function = null } }, null); string second = WillORM.QueryBuilder(null, "STUDENT", new List <MutliQuery>() { new MutliQuery() { field1 = "ID", field2 = "(" + first + ")", function = "in" }, new MutliQuery() { field1 = "active", field2 = "1", function = null } }, null); try { return(WillORM.GetDBSource("STUDENT", second).Cast <STUDENT>().ToList()); } catch { return(new List <STUDENT>()); } }
public bool updateRecord(object record) { try { return(WillORM.UpdateRecord(record)); } catch { return(false); } }
public static bool UpdateStudent(STUDENT student) { try { return(WillORM.UpdateRecord(student)); } catch { return(false); } }
public static int countStudentByGroup(int group_id) { try { return(WillORM.CountRecord("STUDENT", "SELECT COUNT(ID) from STUDENT where ID in (select STUDENT from STUDENT_GROUP_STUDENT_LIST where STUDENT_GROUP in (select ID from STUDENT_GROUP where ID = " + group_id + ")) and ACTIVE = 1")); } catch { return(0); } }
public static bool InactiveStudent(int student_id, int user_id) { try { return(WillORM.InactiveRecord("STUDENT", student_id, user_id)); } catch { return(false); } }
public static bool DeleteSubmission(int id) { try { return(WillORM.DeleteRecord("HOMEWORK_SUBMISSION_LIST", id)); } catch { return(false); } }
public static bool InactiveSubmssion(int Submission_id, int user_id) { try { return(WillORM.InactiveRecord("HOMEWORK_SUBMISSION_LIST", Submission_id, user_id)); } catch { return(false); } }
public static bool InactiveWork(int work_id, int user_id) { try { return(WillORM.InactiveRecord("HOMEWORK", work_id, user_id)); } catch { return(false); } }
public static int CreateGroup(STUDENT_GROUP newGroup) { int newGroup_id = WillORM.InsertRecord(newGroup); return(newGroup_id > 0 ? newGroup_id : 0); }
public static bool InactiveGroup(int group_id, int user_id) { try { return(WillORM.InactiveRecord("STUDENT_GROUP", group_id, user_id)); } catch { return(false); } }
public static QE_CLASS GetClassesByStudent(int student_id) { try { return(WillORM.GetDBSource("QE_CLASS", "select * from QE_CLASS where ID in (select QE_CLASS from CLASS_STUDENT_LIST where STUDENT = " + student_id + " and active = 1) and active = 1").Cast <QE_CLASS>().FirstOrDefault()); } catch { return(null); } }
public static bool InactiveClass(int id) { try { return(WillORM.InactiveRecord("QE_CLASS", id, ClientSessionService.GetSession.loginedUser.ID)); } catch { return(false); } }
public static int AddClass(QE_CLASS newClass) { try { return(WillORM.InsertRecord(newClass)); } catch { return(0); } }
public static int CreateClassStudentMap(CLASS_STUDENT_LIST newMap) { int newMap_id = 0; newMap_id = WillORM.InsertRecord(newMap); return(newMap_id); }
public static List <CLASS_STUDENT_LIST> getClassStudentMap(int class_id, int student_id, int term_id) { try { return(WillORM.GetDBSource("CLASS_STUDENT_LIST", "select * from CLASS_STUDENT_LIST where QE_CLASS in (select ID from QE_CLASS where ID = " + class_id + " and TERM = " + term_id + " and active=1) and STUDENT =" + student_id + " and active=1").Cast <CLASS_STUDENT_LIST>().ToList()); } catch { return(null); } }
public static int AddType(HOMEWORK_TYPE newType) { try { return(WillORM.InsertRecord(newType)); } catch { return(0); } }
public static bool InactiveType(int type_id, int user_id) { try { return(WillORM.InactiveRecord("HOMEWORK_TYPE", type_id, user_id)); } catch { return(false); } }
public static int AddGroupStudentMap(STUDENT_GROUP_STUDENT_LIST newMap) { int newMap_id = WillORM.InsertRecord(newMap); return(newMap_id > 0 ? newMap_id : 0); }
public static int AddWork(HOMEWORK newWork) { try { return(WillORM.InsertRecord(newWork)); } catch { return(0); } }
public static bool InactiveStudentMap(int map_id, int user_id) { try { return(WillORM.InactiveRecord("STUDENT_GROUP_STUDENT_LIST", map_id, user_id)); } catch { return(false); } }
public static int AddSubmission(HOMEWORK_SUBMISSION_LIST newSubmission) { try { return(WillORM.InsertRecord(newSubmission)); } catch { return(0); } }
public static List <USER_GROUP> GetGroup() { try { return(WillORM.GetDBSource("USER_GROUP").Cast <USER_GROUP>().ToList()); } catch { return(null); } }
public static List <HOMEWORK> GetWorks() { try { return(WillORM.GetDBSource("HOMEWORK", "select * from HOMEWORK where STUDENT_GROUP in (select ID from STUDENT_GROUP where TERM='" + TermService.GetCurrentTerm().ID + "' and active=1) and active=1").Cast <HOMEWORK>().ToList()); } catch { return(null); } }
public static int AddRecord(object newRecord) { try { return(WillORM.InsertRecord(newRecord)); } catch { return(0); } }
public static int CreateStudent(STUDENT student) { try { return(WillORM.InsertRecord(student)); } catch { return(0); } }
public static bool RemoveGroup(int group_id) { try { return(WillORM.DeleteRecord("USER_GROUP", group_id)); } catch { return(false); } }
public static List <USER_GROUP_USER_LIST> GetGroupUsers() { try { return(WillORM.GetDBSource("USER_GROUP_USER_LIST").Cast <USER_GROUP_USER_LIST>().ToList()); } catch { return(null); } }
public static List <USER_GROUP_RIGHT> GetGroupRights() { try { return(WillORM.GetDBSource("USER_GROUP_RIGHT").Cast <USER_GROUP_RIGHT>().ToList()); } catch { return(null); } }
public static List <QE_USER> GetAllUser() { try { return(WillORM.GetDBSource("QE_USER").Cast <QE_USER>().ToList()); } catch { return(new List <QE_USER>()); } }
public int addRecordReturnID(object newRecord) { try { return(WillORM.InsertRecord(newRecord)); } catch { return(0); } }