public int Add(Teacher model) { string sql = "insert into Teacher(TeacherName,TeacherPosition,Department,Profession) values(@TeacherName,@TeacherPosition,@Department,@Profession)"; SqlParameter[] para = { new SqlParameter("@TeacherName", model.Uname), new SqlParameter("@TeacherPosition", model.UPosition), new SqlParameter("@Department", model.UDepartments), new SqlParameter("@Profession", model.UProfession), }; return(DBHelperSQL.Execute(sql, para)); }
public int Edit(AnnouncementModel model) { string sql = "update Release set ID=@ID,Name=@Name,Title=@Title,Time=@Time"; SqlParameter[] para = { new SqlParameter("@ID", model.ID), new SqlParameter("@Name", model.Name), new SqlParameter("@Title", model.Title), new SqlParameter("@Time", model.Time) }; return(DBHelperSQL.Execute(sql, para)); }
//public DataTable UserList(string strWhere) //{ // string sql = "select * from Release"; // if (strWhere != "") // { // sql += "where"; // sql += strWhere; // } // return DBHelperSQL.Query(sql); //} public int Add(AnnouncementModel model) { string sql = "insert into Release(ID,Name,Title,Time)Values(@ID,@Name,@Title,@Time)"; SqlParameter[] para = { new SqlParameter("@ID", model.ID), new SqlParameter("@Name", model.Name), new SqlParameter("@Title", model.Title), new SqlParameter("@Time", model.Time) }; return(DBHelperSQL.Execute(sql, para)); }
public int Edit(TestModle modle) { string sql = "update Paper set QID=@QID,Questionname=@Questionname,Qauthor=@Qauthor,Teacherclass=@Teacherclass,Test=@Test"; SqlParameter[] para = { new SqlParameter("@QID", modle.TestID), new SqlParameter("@Questionname", modle.TestCourse), new SqlParameter("@Qauthor", modle.TestName), new SqlParameter("@Teacherclass", modle.TestClass), new SqlParameter("@Test", modle.Test) }; return(DBHelperSQL.Execute(sql, para)); }
//添加试卷 public int Add(TestModle modle) { string sql = "insert into Paper(QID,Questionname,Qauthor,Teacherclass,Test)values(@QID,@Questionname,@Qauthor,@Teacherclass,@Test)"; SqlParameter[] para = { new SqlParameter("@QID", modle.TestID), new SqlParameter("@Questionname", modle.TestCourse), new SqlParameter("@Qauthor", modle.TestName), new SqlParameter("@Teacherclass", modle.TestClass), new SqlParameter("@Test", modle.Test) }; return(DBHelperSQL.Execute(sql, para)); }
public int Edit(UserInfoModel model) { string sql = "update UserInfo set UPassword=@UPassword,UType=@UType,UTel=@UTel,UEmail=@UEmail,UHeadPhoto=@UHeadPhoto where UName=@UName"; SqlParameter[] para = { new SqlParameter("@UName", model.UName), new SqlParameter("@UPassword", model.UPassword), new SqlParameter("@UType", model.UType), new SqlParameter("@UTel", model.UTel), new SqlParameter("@UEmail", model.UEmail), new SqlParameter("@UHeadPhoto", model.UHeadPhoto), }; return(DBHelperSQL.Execute(sql, para)); }
public int Add(Student model) { string sql = "insert into Student(XSName,XSGender,XSEnrollmentYear,Studentclass,Studentgrade,Studentbirth) values(@XSName,@XSGender,@XSEnrollmentYear,@Studentclass,@Studentgrade,@Studentbirth)"; SqlParameter[] para = { new SqlParameter("@XSName", model.XSName), new SqlParameter("@XSGender", model.XSGender), new SqlParameter("@XSEnrollmentYear", model.XSEnrollmentYear), new SqlParameter("@Studentclass", model.Studentclass), new SqlParameter("@Studentgrade", model.Studentgrade), new SqlParameter("@Studentbirth", model.Studentbirth) }; return(DBHelperSQL.Execute(sql, para)); }
public int Add(UserInfoModel model) { string sql = "insert into Userinfo(UName,UPassword,UType,UTel,UEmail,UHeadPhoto) values(@UName,@UPassword,@UTel,@UType,@UEmail,@UHeadPhoto)"; SqlParameter[] para = { new SqlParameter("@UName", model.UName), new SqlParameter("@UPassword", model.UPassword), new SqlParameter("@UTel", model.UTel), new SqlParameter("@UType", model.UType), new SqlParameter("@UEmail", model.UEmail), new SqlParameter("@UHeadPhoto", model.UHeadPhoto) }; return(DBHelperSQL.Execute(sql, para)); }
public int Edit(CurriculumModel model) { string sql = "update Curriculum set Monday=@Monday,Tuesday=@Tuesday,Wednesday=@Wednesday,Thursday=@Thursday,Friday=@Friday,Saturday=@Saturday,Sunday=@Sunday"; SqlParameter[] para = { new SqlParameter("@Monday", model.Monday), new SqlParameter("@Tuesday", model.Tuesday), new SqlParameter("@Wednesday", model.Wednesday), new SqlParameter("@Thursday", model.Thursday), new SqlParameter("@Friday", model.Friday), new SqlParameter("@Saturday", model.Saturday), new SqlParameter("@Sunday", model.Sunday) }; return(DBHelperSQL.Execute(sql, para)); }
public int Add(CurriculumModel model) { string sql = "insert into Curriculum(Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday)Values(@Monday,@Tuesday,@Wednesday,@Thursday,@Friday,@Saturday,@Sunday)"; SqlParameter[] para = { new SqlParameter("@Monday", model.Monday), new SqlParameter("@Tuesday", model.Tuesday), new SqlParameter("@Wednesday", model.Wednesday), new SqlParameter("@Thursday", model.Thursday), new SqlParameter("@Friday", model.Friday), new SqlParameter("@Saturday", model.Saturday), new SqlParameter("@Sunday", model.Sunday) }; return(DBHelperSQL.Execute(sql, para)); }
public int Add(Item model) { string sql = "insert into Itembank(Qusetion,Chapter,Qtext,Qcontent,Qanswer,Qauthor,QSemester) values(@Qusetion,@Chapter,@Qtext,@Qcontent,@Qanswer,@Qauthor,@QSemester)"; SqlParameter[] para = { new SqlParameter("@Qusetion", model.Qusetion), new SqlParameter("@Chapter", model.Chapter), new SqlParameter("@Qtext", model.Qtext), new SqlParameter("@Qcontent", model.Qcontent), new SqlParameter("@Qanswer", model.Qanswer), new SqlParameter("@Qauthor", model.Qauthor), new SqlParameter("@QSemester", model.QSemester) }; return(DBHelperSQL.Execute(sql, para)); }
public int Add(Stutest modle) { string sql = "insert into Stutest(Chooseone,Choosetwo,Choosethree,Choosefour,Choosefive,Textone,Texttwo,Textthree,Textfive,Textsix,Txteseven)values(@Chooseone,@Choosetwo,@Choosethree,@Choosefour,@Choosefive,@Textone,@Texttwo,@Textthree,@Textfive,@Textsix,@Txteseven)"; SqlParameter[] para = { new SqlParameter("@Chooseone", modle.Chooseone), new SqlParameter("@Choosetwo", modle.Choosetwo), new SqlParameter("@Choosethree", modle.Choosethree), new SqlParameter("@Choosefour", modle.Choosefour), new SqlParameter("@Choosefive", modle.Choosefive), new SqlParameter("@Textone", modle.Textone), new SqlParameter("@Texttwo", modle.Texttwo), new SqlParameter("@Textthree", modle.Textthree), new SqlParameter("@Textfive", modle.Textfive), new SqlParameter("@Textsix", modle.Textsix), new SqlParameter("@Txteseven", modle.Txteseven) }; return(DBHelperSQL.Execute(sql, para)); }