public bool Update() { string SqlStr = ""; SqlStr += "UPDATE honors "; SqlStr += "SET studentNo = @studentno, "; SqlStr += "termno = @termno, "; SqlStr += "Awardname = @awardname, "; SqlStr += "Awarddep = @awarddep, "; SqlStr += "Awarddate = @awarddate, "; SqlStr += "Awardaddress = @awardaddress, "; SqlStr += "AwardSubject = @awardsubject, "; SqlStr += "Remarks = @remarks, "; SqlStr += "info = @info "; SqlStr += " where ID = @id"; List <Parameter> d_list = new List <Parameter>(); d_list.Add(new Parameter("@studentno", strstudentNo)); d_list.Add(new Parameter("@termno", strtermNo)); d_list.Add(new Parameter("@awardaddress", strAwardaddress)); d_list.Add(new Parameter("@Awarddep", strAwarddep)); d_list.Add(new Parameter("@Awardname", strAwardname)); d_list.Add(new Parameter("@Awarddate", dateAwarddate.ToString())); d_list.Add(new Parameter("@awardsubject", strAwardSubject)); d_list.Add(new Parameter("@remarks", strRemarks)); d_list.Add(new Parameter("@info", strinfo.ToString())); d_list.Add(new Parameter("@id", intid.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public bool Update() { List <Parameter> d_list = new List <Parameter>(); string SqlStr = ""; SqlStr += " UPDATE ScoreGrade "; SqlStr += " SET studentNo = @studentno, "; SqlStr += " termno = @termno, "; SqlStr += " scoregrade = @scoregrade, "; SqlStr += " teamtimes = @teamtimes, "; SqlStr += " courseNo = @courseno, "; SqlStr += " attitudegrade = @attitudegrade, "; SqlStr += " Writegrade = @writegrade, "; SqlStr += " compositiongrade = @compositiongrade, "; SqlStr += " practicegrade = @practicegrade, "; SqlStr += " readinggrade = @readinggrade, "; SqlStr += " othergrade = @othergrade"; SqlStr += " WHERE ID = @id "; d_list.Add(new Parameter("@studentno", strstudentNo)); d_list.Add(new Parameter("@termno", strtermNo)); d_list.Add(new Parameter("@teamtimes", intteamtimes.ToString())); d_list.Add(new Parameter("@courseno", strcourseNo)); d_list.Add(new Parameter("@scoregrade", strscoregrade.ToString())); d_list.Add(new Parameter("@attitudegrade", strattitudegrade.ToString())); d_list.Add(new Parameter("@writegrade", strWritegrade)); d_list.Add(new Parameter("@compositiongrade", strcompositiongrade)); d_list.Add(new Parameter("@practicegrade", strpracticegrade)); d_list.Add(new Parameter("@readinggrade", strreadinggrade.ToString())); d_list.Add(new Parameter("@othergrade", strothergrade.ToString())); d_list.Add(new Parameter("@id", intid.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public bool Insert() { string str = "INSERT INTO ClassStudent (classtudentNo, classtudentName, institute, yeargrade, classNum)"; str += "VALUES (@classtudentno, @classtudentname, @institute, @yeargrade, @classnum)"; List <Parameter> d_list = new List <Parameter>(); d_list.Add(new Parameter("classtudentno", strclasstudentNo.ToString())); d_list.Add(new Parameter("classtudentname", strclasstudentName.ToString())); d_list.Add(new Parameter("institute", strinstitute.ToString())); d_list.Add(new Parameter("yeargrade", stryeargrade.ToString())); d_list.Add(new Parameter("classnum", strclassNum.ToString())); return(Sql_Class.ExecuteSQL(str, d_list)); }
public bool Insert() { string SqlStr = ""; SqlStr += " INSERT INTO dbo.Term (termNo, termname, Remarks, info, years) "; SqlStr += " VALUES (@termno, @termname, @remarks, @info, @years)"; List <Parameter> d_list = new List <Parameter>(); d_list.Add(new Parameter("@termname", strtermname)); d_list.Add(new Parameter("@termno", strtermNo)); d_list.Add(new Parameter("@years", stryears)); d_list.Add(new Parameter("@remarks", strRemarks)); d_list.Add(new Parameter("@info", strinfo.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public static bool UpdateAward(string p_id, string p_results, string p_name, string p_date) { string SqlStr = "update honors set "; List <Parameter> d_list = new List <Parameter>(); SqlStr += "Awardname = @awardname,"; SqlStr += "Awarddep = @awarddep,"; SqlStr += "Awarddate = @awarddate"; d_list.Add(new Parameter("@Awarddep", p_results)); d_list.Add(new Parameter("@Awardname", p_name)); d_list.Add(new Parameter("@Awarddate", p_date)); SqlStr += " WHERE ID = @id "; d_list.Add(new Parameter("@id", p_id.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public static bool InsertByUpdate(string p_termno, string yeargrade1, string yeargrade2, string yeargrade3) { List <Parameter> d_list = new List <Parameter>(); string str = ""; str += " INSERT INTO ScoreRecord (studentNo, termno, createdate, Recordstatus, Printstatus)"; str += " SELECT s.studentNo ,'" + p_termno + "',getdate(),'1','δ´òÓ¡'"; str += " FROM ClassStudent c,Student s WHERE c.classtudentNo=s.classtudentNo and s.studentno is not null"; str += " and c.yeargrade IN (@yeargrade1,@yeargrade2,@yeargrade3)"; str += " AND NOT exists ( SELECT studentno FROM ScoreRecord a WHERE a.studentNo = s.studentNo AND a.termno =@termno )"; d_list.Add(new Parameter("@yeargrade1", yeargrade1)); d_list.Add(new Parameter("@yeargrade2", yeargrade2)); d_list.Add(new Parameter("@yeargrade3", yeargrade3)); d_list.Add(new Parameter("@termno", p_termno)); return(Sql_Class.ExecuteSQL(str, d_list)); }
public bool Insert() { string SqlStr = ""; SqlStr += "INSERT INTO honors (studentNo, termno, Awardname, Awarddep, Awarddate, Awardaddress, AwardSubject, Remarks, info)"; SqlStr += "VALUES (@studentno, @termno, @awardname, @awarddep, @awarddate, @awardaddress, @awardsubject, @remarks, @info)"; List <Parameter> d_list = new List <Parameter>(); d_list.Add(new Parameter("@studentno", strstudentNo)); d_list.Add(new Parameter("@termno", strtermNo)); d_list.Add(new Parameter("@awardaddress", strAwardaddress)); d_list.Add(new Parameter("@Awarddep", strAwarddep)); d_list.Add(new Parameter("@Awardname", strAwardname)); d_list.Add(new Parameter("@Awarddate", dateAwarddate.ToString())); d_list.Add(new Parameter("@awardsubject", strAwardSubject)); d_list.Add(new Parameter("@remarks", strRemarks)); d_list.Add(new Parameter("@info", strinfo.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public bool Insert() { string SqlStr = ""; SqlStr += " INSERT INTO dbo.Evaluation (studentNo, termno, item, itemtype, createdate, Modifydate, Quantity, results, Remarks, info) "; SqlStr += " VALUES (@studentno, @termno, @item, @itemtype, @createdate, @modifydate, @quantity, @results, @remarks, @info)"; List <Parameter> d_list = new List <Parameter>(); d_list.Add(new Parameter("@studentno", strstudentNo)); d_list.Add(new Parameter("@termno", strtermNo)); d_list.Add(new Parameter("@item", stritem)); d_list.Add(new Parameter("@itemtype", stritemtype)); d_list.Add(new Parameter("@createdate", datecreatedate.ToString())); d_list.Add(new Parameter("@modifydate", dateModifydate.ToString())); d_list.Add(new Parameter("@quantity", strQuantity)); d_list.Add(new Parameter("@results", strresults)); d_list.Add(new Parameter("@remarks", strRemarks)); d_list.Add(new Parameter("@info", strinfo.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public bool Update() { string SqlStr = ""; SqlStr += " UPDATE dbo.Evaluation "; SqlStr += " SET studentNo = @studentno, "; SqlStr += " termno = @termno, "; SqlStr += " item = @item, "; SqlStr += " itemtype = @itemtype, "; SqlStr += " createdate = @createdate, "; SqlStr += " Modifydate = @modifydate, "; SqlStr += "Quantity = @quantity, "; SqlStr += " results = @results, "; SqlStr += " Remarks = @remarks, "; SqlStr += " info = @info "; SqlStr += " WHERE ID = @id "; List <Parameter> d_list = new List <Parameter>(); if (stritemtype == "研究课题") { strQuantity = ""; } else { createdate = DateTime.Now; } d_list.Add(new Parameter("@studentno", strstudentNo)); d_list.Add(new Parameter("@termno", strtermNo)); d_list.Add(new Parameter("@item", stritem)); d_list.Add(new Parameter("@itemtype", stritemtype)); d_list.Add(new Parameter("@createdate", datecreatedate.ToString())); d_list.Add(new Parameter("@modifydate", dateModifydate.ToString())); d_list.Add(new Parameter("@quantity", strQuantity)); d_list.Add(new Parameter("@results", strresults)); d_list.Add(new Parameter("@remarks", strRemarks)); d_list.Add(new Parameter("@info", strinfo.ToString())); d_list.Add(new Parameter("@id", intid.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public bool Insert() { List <Parameter> d_list = new List <Parameter>(); string SqlStr = ""; SqlStr += "INSERT INTO ScoreRecord (studentNo, termno, createdate, Modifydate, Remarks, info, Recordstate, Printstatus, Printdate, Printperson, createperson, Modifyperson, Attendance, Absenteeism, leave, classjob, Productlevel, SchoolCourseName, SchoolCourseGrade, SchoolCourseNameTwo, SchoolCourseGradeTwo, MyEvaluate, Parenthope, SpecialtyElective, SpecialtyElectiveGrade) "; SqlStr += " VALUES (@studentno, @termno, @createdate, @modifydate, @remarks,"; SqlStr += " @info, @recordstate, @printstatus, @printdate, @printperson,"; SqlStr += " @createperson, @modifyperson, @attendance, @absenteeism, @leave,"; SqlStr += " @classjob, @productlevel, @schoolcoursename, @schoolcoursegrade, @schoolcoursenametwo,"; SqlStr += " @schoolcoursegradetwo, @myevaluate, @parenthope, @specialtyelective, @specialtyelectivegrade)"; d_list.Add(new Parameter("@studentno", strstudentNo)); d_list.Add(new Parameter("@termno", strtermNo)); d_list.Add(new Parameter("@createdate", datecreatedate.ToString())); d_list.Add(new Parameter("@Remarks", strRemarks)); d_list.Add(new Parameter("@modifydate", dateModifydate.ToString())); d_list.Add(new Parameter("@printdate", datePrintdate.ToString())); d_list.Add(new Parameter("@info", strinfo)); d_list.Add(new Parameter("@Recordstatus", strRecordstatus)); d_list.Add(new Parameter("@Printstatus", strPrintstatus)); d_list.Add(new Parameter("@Printperson", strPrintperson.ToString())); d_list.Add(new Parameter("@createperson", strcreateperson.ToString())); d_list.Add(new Parameter("@Modifyperson", strModifyperson)); d_list.Add(new Parameter("@Attendance", strAttendance)); d_list.Add(new Parameter("@Absenteeism", strAbsenteeism.ToString())); d_list.Add(new Parameter("@leave", strleave)); d_list.Add(new Parameter("@classjob", strclassjob.ToString())); d_list.Add(new Parameter("@Productlevel", strProductlevel.ToString())); d_list.Add(new Parameter("@SchoolCourseName", strSchoolCourseName)); d_list.Add(new Parameter("@SchoolCourseGrade", strSchoolCourseGrade)); d_list.Add(new Parameter("@SchoolCourseNameTwo", strSchoolCourseNameTwo)); d_list.Add(new Parameter("@SchoolCourseGradeTwo", strSchoolCourseGradeTwo.ToString())); d_list.Add(new Parameter("@MyEvaluate", strMyEvaluate.ToString())); d_list.Add(new Parameter("@Parenthope", strParenthope)); d_list.Add(new Parameter("@SpecialtyElective", strSpecialtyElective.ToString())); d_list.Add(new Parameter("@SpecialtyElectiveGrade", strSpecialtyElectiveGrade.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public bool Update() { string SqlStr = ""; SqlStr += "UPDATE Term "; SqlStr += " SET termNo = @termno, "; SqlStr += " termname = @termname, "; SqlStr += " Remarks = @remarks, "; SqlStr += " info = @info, "; SqlStr += " years = @years "; SqlStr += " where ID = @id"; List <Parameter> d_list = new List <Parameter>(); d_list.Add(new Parameter("@termname", strtermname)); d_list.Add(new Parameter("@termno", strtermNo)); d_list.Add(new Parameter("@years", stryears)); d_list.Add(new Parameter("@remarks", strRemarks)); d_list.Add(new Parameter("@info", strinfo.ToString())); d_list.Add(new Parameter("@id", intid.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public bool Insert() { List <Parameter> d_list = new List <Parameter>(); string SqlStr = ""; SqlStr += "INSERT INTO dbo.ScoreGrade (studentNo, termno, scoregrade, teamtimes, courseNo, attitudegrade, Writegrade, compositiongrade, practicegrade, readinggrade, othergrade)"; SqlStr += " VALUES (@studentno, @termno, @scoregrade, @teamtimes, @courseno,"; SqlStr += " @attitudegrade, @writegrade, @compositiongrade, @practicegrade, @readinggrade, @othergrade)"; d_list.Add(new Parameter("@studentno", strstudentNo)); d_list.Add(new Parameter("@termno", strtermNo)); d_list.Add(new Parameter("@teamtimes", intteamtimes.ToString())); d_list.Add(new Parameter("@courseno", strcourseNo)); d_list.Add(new Parameter("@scoregrade", strscoregrade.ToString())); d_list.Add(new Parameter("@attitudegrade", strattitudegrade.ToString())); d_list.Add(new Parameter("@writegrade", strWritegrade)); d_list.Add(new Parameter("@compositiongrade", strcompositiongrade)); d_list.Add(new Parameter("@practicegrade", strpracticegrade)); d_list.Add(new Parameter("@readinggrade", strreadinggrade.ToString())); d_list.Add(new Parameter("@othergrade", strothergrade.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public static bool UpdateByID(string p_id, string p_results, string p_name, string p_date, string p_type) { string SqlStr = "update Evaluation set "; List <Parameter> d_list = new List <Parameter>(); SqlStr += "item = @item,"; SqlStr += "results = @results,"; d_list.Add(new Parameter("@results", p_results)); d_list.Add(new Parameter("@item", p_name)); if (p_type == "研究课题") { SqlStr += "createdate = @createdate"; d_list.Add(new Parameter("@createdate", p_date)); } else { SqlStr += "Quantity = @quantity"; d_list.Add(new Parameter("@quantity", p_date)); } SqlStr += " WHERE ID = @id "; d_list.Add(new Parameter("@id", p_id.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }
public bool Update() { List <Parameter> d_list = new List <Parameter>(); string SqlStr = ""; SqlStr += " UPDATE ScoreRecord "; SqlStr += " SET studentNo = @studentno, "; SqlStr += " termno = @termno, "; SqlStr += " createdate = @createdate, "; SqlStr += " Modifydate = @modifydate, "; SqlStr += " Remarks = @remarks, "; SqlStr += " info = @info, "; SqlStr += " Recordstatus = @Recordstatus, "; SqlStr += " Printstatus = @printstatus, "; SqlStr += " Printdate = @printdate, "; SqlStr += " Printperson = @printperson, "; SqlStr += " createperson = @createperson, "; SqlStr += " Modifyperson = @modifyperson, "; SqlStr += " Attendance = @attendance, "; SqlStr += " Absenteeism = @absenteeism, "; SqlStr += " leave = @leave, "; SqlStr += " classjob = @classjob, "; SqlStr += " Productlevel = @productlevel, "; SqlStr += " SchoolCourseName = @schoolcoursename, "; SqlStr += " SchoolCourseGrade = @schoolcoursegrade, "; SqlStr += " SchoolCourseNameTwo = @schoolcoursenametwo, "; SqlStr += " SchoolCourseGradeTwo = @schoolcoursegradetwo, "; SqlStr += " MyEvaluate = @myevaluate, "; SqlStr += " Parenthope = @parenthope, "; SqlStr += " SpecialtyElective = @specialtyelective, "; SqlStr += " SpecialtyElectiveGrade = @specialtyelectivegrade "; SqlStr += " WHERE ID = @id "; d_list.Add(new Parameter("@studentno", strstudentNo)); d_list.Add(new Parameter("@termno", strtermNo)); d_list.Add(new Parameter("@createdate", datecreatedate.ToString())); d_list.Add(new Parameter("@Remarks", strRemarks)); d_list.Add(new Parameter("@modifydate", dateModifydate.ToString())); d_list.Add(new Parameter("@printdate", datePrintdate.ToString())); d_list.Add(new Parameter("@info", strinfo)); d_list.Add(new Parameter("@Recordstatus", strRecordstatus)); d_list.Add(new Parameter("@Printstatus", strPrintstatus)); d_list.Add(new Parameter("@Printperson", strPrintperson.ToString())); d_list.Add(new Parameter("@createperson", strcreateperson.ToString())); d_list.Add(new Parameter("@Modifyperson", strModifyperson)); d_list.Add(new Parameter("@Attendance", strAttendance)); d_list.Add(new Parameter("@Absenteeism", strAbsenteeism.ToString())); d_list.Add(new Parameter("@leave", strleave)); d_list.Add(new Parameter("@classjob", strclassjob.ToString())); d_list.Add(new Parameter("@Productlevel", strProductlevel.ToString())); d_list.Add(new Parameter("@SchoolCourseName", strSchoolCourseName)); d_list.Add(new Parameter("@SchoolCourseGrade", strSchoolCourseGrade)); d_list.Add(new Parameter("@SchoolCourseNameTwo", strSchoolCourseNameTwo)); d_list.Add(new Parameter("@SchoolCourseGradeTwo", strSchoolCourseGradeTwo.ToString())); d_list.Add(new Parameter("@MyEvaluate", strMyEvaluate.ToString())); d_list.Add(new Parameter("@Parenthope", strParenthope)); d_list.Add(new Parameter("@SpecialtyElective", strSpecialtyElective.ToString())); d_list.Add(new Parameter("@SpecialtyElectiveGrade", strSpecialtyElectiveGrade.ToString())); d_list.Add(new Parameter("@id", intid.ToString())); return(Sql_Class.ExecuteSQL(SqlStr, d_list)); }