protected void BtnStudentSelectCourseInfoSave_Click(object sender, EventArgs e)
 {
     ENTITY.StudentSelectCourseInfo studentSelectCourseInfo = new ENTITY.StudentSelectCourseInfo();
     studentSelectCourseInfo.studentNumber = studentNumber.SelectedValue;
     studentSelectCourseInfo.courseNumber  = courseNumber.SelectedValue;
     if (!string.IsNullOrEmpty(Common.GetMes.GetRequestQuery(Request, "selectId")))
     {
         studentSelectCourseInfo.selectId = int.Parse(Request["selectId"]);
         if (BLL.bllStudentSelectCourseInfo.EditStudentSelectCourseInfo(studentSelectCourseInfo))
         {
             Common.ShowMessage.myScriptMes(Page, "Suess", "if(confirm(\"信息修改成功,是否继续修改?否则返回信息列表。\")) {location.href=\"M_EditStudentSelectCourseInfo.aspx?selectId=" + Request["selectId"] + "\"} else  {location.href=\"M_StudentSelectCourseInfoList.aspx\"} ");
         }
         else
         {
             Common.ShowMessage.Show(Page, "error", "信息修改失败,请重试或联系管理人员..");
         }
     }
     else
     {
         if (BLL.bllStudentSelectCourseInfo.AddStudentSelectCourseInfo(studentSelectCourseInfo))
         {
             Common.ShowMessage.myScriptMes(Page, "Suess", "if(confirm(\"信息添加成功,是否继续添加?否则返回信息列表。\")) {location.href=\"M_EditStudentSelectCourseInfo.aspx\"} else  {location.href=\"M_StudentSelectCourseInfoList.aspx\"} ");
         }
         else
         {
             Common.ShowMessage.Show(Page, "error", "信息添加失败,请重试或联系管理人员..");
         }
     }
 }
예제 #2
0
 /*如果是需要对记录进行编辑需要在界面初始化显示数据*/
 private void LoadData()
 {
     if (!string.IsNullOrEmpty(Common.GetMes.GetRequestQuery(Request, "selectId")))
     {
         ENTITY.StudentSelectCourseInfo studentSelectCourseInfo = BLL.bllStudentSelectCourseInfo.getSomeStudentSelectCourseInfo(Convert.ToInt32(Common.GetMes.GetRequestQuery(Request, "selectId")));
         studentNumber.Text = BLL.bllStudent.getSomeStudent(studentSelectCourseInfo.studentNumber).studentName;
         courseNumber.Text  = BLL.bllCourseInfo.getSomeCourseInfo(studentSelectCourseInfo.courseNumber).courseName;
     }
 }
예제 #3
0
 /*更新选课信息*/
 public static bool EditStudentSelectCourseInfo(ENTITY.StudentSelectCourseInfo studentSelectCourseInfo)
 {
     return(DAL.dalStudentSelectCourseInfo.EditStudentSelectCourseInfo(studentSelectCourseInfo));
 }