public static void ExamPapersInsert(int personelId, string title, byte[] paper) { string sql = string.Format(@"INSERT INTO ExamPapers (PersonelId, PaperName, PaperValue) VALUES ({0},'{1}',@paper)", personelId, title); SqlParameter p1 = new SqlParameter("paper", paper); NativeSqlDb.ExecuteNonQuery(sql, p1); }
public static void PersonelCoursesInsert(int semesterId, int personelId, int courseId) { string sql = string.Format(@"INSERT INTO PersonelsCourses (SemesterId, PersonelId, CourseId) VALUES({0},{1},{2})", semesterId, personelId, courseId); NativeSqlDb.ExecuteNonQuery(sql); }
public static void AnswerInser(int questionId, string name, bool isCorrect) { string sql = string.Format("INSERT INTO Answer (QuestionId, Name, IsCorrect) VALUES ({0},'{1}',{2})", questionId, name, (isCorrect) ? 1 : 0); NativeSqlDb.ExecuteNonQuery(sql); }
public static void ExamPaperss(int id) { string sql = string.Format("Delete ExamPapers Where Id = {0}", id); NativeSqlDb.ExecuteNonQuery(sql); }
public static void ChapterDelete(int id) { string sql = string.Format("Delete Chapters Where Id = {0}", id); NativeSqlDb.ExecuteNonQuery(sql); }
public static void ChapterInsert(int courseId, int chapterNo, string chapterName) { string sql = string.Format("INSERT INTO Chapters (CourseId, ChapterNo, ChapterName) VALUES ({0},{1},'{2}')", courseId, chapterNo, chapterName); NativeSqlDb.ExecuteNonQuery(sql); }
public static void PersonelCoursesDelete(int id) { string sql = string.Format("Delete PersonelsCourses Where Id = {0}", id); NativeSqlDb.ExecuteNonQuery(sql); }
public static void PersonelCoursesUpdate(int id, int semesterId, int courseId) { string sql = string.Format(@"UPDATE PersonelsCourses SET SemesterId = {0} ,CourseId = {1} WHERE Id = {2}", semesterId, courseId, id); NativeSqlDb.ExecuteNonQuery(sql); }