public bool ChangeOutcome(List <string> where)
        {
            bool          isUpdated = false;
            List <string> colValues = ConvertToColumnValues(this);
            Dictionary <string, string> colValuePairs = new Dictionary <string, string>();
            string tableName = "Outcome";

            DataAccess.DataHandler dh = new DataAccess.DataHandler();

            colValuePairs.Add("SubjectID", colValues[0]);
            colValuePairs.Add("name", colValues[1]);
            isUpdated = dh.Update(tableName, colValuePairs, where);

            return(isUpdated);
        }
Esempio n. 2
0
        public bool ChangeAccount(List <string> where)
        {
            bool          isUpdated = false;
            List <string> colValues = ConvertToColumnValues(this);
            Dictionary <string, string> colValuePairs = new Dictionary <string, string>();
            string tableName = "Account";

            DataAccess.DataHandler dh = new DataAccess.DataHandler();

            colValuePairs.Add("username", colValues[0]);
            colValuePairs.Add("AccPassword", colValues[1]);
            colValuePairs.Add("AccPriority", colValues[2]);
            colValuePairs.Add("isAdmin", colValues[3]);
            isUpdated = dh.Update(tableName, colValuePairs, where);

            return(isUpdated);
        }
        public bool ChangeQuestion(List <string> where)
        {
            bool          isUpdated = false;
            List <string> colValues = ConvertToColumnValues(this);
            Dictionary <string, string> colValuePairs = new Dictionary <string, string>();
            string tableName = "Question";

            DataAccess.DataHandler dh = new DataAccess.DataHandler();

            colValuePairs.Add("OutcomeDetailsID", colValues[0]);
            colValuePairs.Add("QuestionTypeID", colValues[1]);
            colValuePairs.Add("Questions", colValues[2]);
            colValuePairs.Add("QuestionWeight", colValues[3]);
            isUpdated = dh.Update(tableName, colValuePairs, where);

            return(isUpdated);
        }
        public bool ChangeCourse(List <string> where)
        {
            bool          isUpdated = false;
            List <string> colValues = ConvertToColumnValues(this);
            Dictionary <string, string> colValuePairs = new Dictionary <string, string>();
            string tableName = "Course";

            DataAccess.DataHandler dh = new DataAccess.DataHandler();

            colValuePairs.Add("code", colValues[0]);
            colValuePairs.Add("name", colValues[1]);
            colValuePairs.Add("NQFLevel", colValues[2]);
            colValuePairs.Add("CourseDescription", colValues[3]);
            isUpdated = dh.Update(tableName, colValuePairs, where);

            return(isUpdated);
        }
        public bool ChangeSubjects(List <string> where)
        {
            bool          isUpdated = false;
            List <string> colValues = ConvertToColumnValues(this);
            Dictionary <string, string> colValuePairs = new Dictionary <string, string>();
            string tableName = "Subjects";

            DataAccess.DataHandler dh = new DataAccess.DataHandler();

            colValuePairs.Add("name", colValues[0]);
            colValuePairs.Add("code", colValues[1]);
            colValuePairs.Add("duration", colValues[2]);
            colValuePairs.Add("SubjectWeight", colValues[3]);
            colValuePairs.Add("SubjectDescription", colValues[4]);
            isUpdated = dh.Update(tableName, colValuePairs, where);

            return(isUpdated);
        }
Esempio n. 6
0
        public bool ChangeLecturerCourseSubject(List <string> where)
        {
            bool          isUpdated = false;
            List <string> colValues = ConvertToColumnValues(this);
            Dictionary <string, string> colValuePairs = new Dictionary <string, string>();
            string tableName = "LecturerCourseSubject";

            DataAccess.DataHandler dh = new DataAccess.DataHandler();

            colValuePairs.Add("LecturerID", colValues[0]);
            colValuePairs.Add("CourseSubjectID", colValues[1]);
            colValuePairs.Add("startDate", colValues[2]);
            colValuePairs.Add("endDate", colValues[3]);
            colValuePairs.Add("isFlagged", colValues[4]);
            isUpdated = dh.Update(tableName, colValuePairs, where);

            return(isUpdated);
        }
        public bool ChangeLecturer(List <string> where)
        {
            bool          isUpdated = false;
            List <string> colValues = ConvertToColumnValues(this);
            Dictionary <string, string> colValuePairs = new Dictionary <string, string>();
            string tableName = "Lecturer";

            DataAccess.DataHandler dh = new DataAccess.DataHandler();

            colValuePairs.Add("AccountID", colValues[0]);
            colValuePairs.Add("name", colValues[1]);
            colValuePairs.Add("surname", colValues[2]);
            colValuePairs.Add("cell", colValues[3]);
            colValuePairs.Add("email", colValues[4]);
            colValuePairs.Add("LecturerLevel", colValues[5]);
            isUpdated = dh.Update(tableName, colValuePairs, where);

            return(isUpdated);
        }