public void StartSession(String UserIDForSession) { #if DBSESSIONTEST //hand initialising the database so you have stuff to work with UserID = UserIDForSession; SessionStatus = DBSessionStatus.DBSESSIONSTATUS_OPEN; //basic initialising Schools.SchoolName = "PAIGE CODING"; Schools.NumCourses = 3; Schools.Courses = new DBCourse[3]; Schools.Courses[0].CourseName = "C#"; Schools.Courses[0].CourseCredits = 5; Schools.Courses[1].CourseName = "C++"; Schools.Courses[1].CourseCredits = 11; Schools.Courses[2].CourseName = "C"; Schools.Courses[2].CourseCredits = 22; UserCourses = new DBUserCourse[5]; UserCourses[0].Course = Schools.Courses[0]; UserCourses[0].Year = DBUserCourse.DBYear.DBYEAR_1; UserCourses[1].Course = Schools.Courses[0]; UserCourses[1].Year = DBUserCourse.DBYear.DBYEAR_2; UserCourses[2].Course = Schools.Courses[0]; UserCourses[2].Year = DBUserCourse.DBYear.DBYEAR_3; UserCourses[3].Course = Schools.Courses[2]; UserCourses[3].Year = DBUserCourse.DBYear.DBYEAR_1; UserCourses[4].Course = Schools.Courses[1]; UserCourses[4].Year = DBUserCourse.DBYear.DBYEAR_4; #else // typically this is where you would run database access for the user. #endif }
public void StartSession(String UserIDForSession) { #if DBSESSIONTEST UserID = UserIDForSession; SessionStatus = DBSessionStatus.DBSESSIONSTATUS_OPEN; #else // typically this is where you would run database access for the user #endif }
public DatabaseSession() { UserID = ""; SessionStatus = DBSessionStatus.DBSESSIONSTATUS_VOID; }