protected void SaveD_T_Click(object sender, EventArgs e)
        {
            DateTime     sdate = Convert.ToDateTime(DateList_R.SelectedValue.Split(',')[0]);
            DateTime     edate = Convert.ToDateTime(DateList_R.SelectedValue.Split(',')[1]);
            M_EDU_AutoPK pkMod = pkBll.SelReturnModel(Convert.ToInt32(pkBll.SelByDate(ClassID, buser.GetLogin().UserID, sdate, edate).Rows[0]["ID"]));

            pkMod.Config = Json_Hid.Value;
            pkBll.UpdateByID(pkMod);
            pkBll.InsertTeach(Teach_Hid.Value, TeacList_Dr.SelectedItem.Text, pkMod.Ownclass, Time_Hid.Value, DataConverter.CDate(Date_T.Text));
        }
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            M_EDU_AutoPK pkMod = new M_EDU_AutoPK();

            if (ClassID > 0)//根据班级id判断是添加还是修改排课内容
            {
                DateTime sdate = Convert.ToDateTime(DateList_R.SelectedValue.Split(',')[0]);
                DateTime edate = Convert.ToDateTime(DateList_R.SelectedValue.Split(',')[1]);
                pkMod = pkBll.SelReturnModel(Convert.ToInt32(pkBll.SelByDate(ClassID, buser.GetLogin().UserID, sdate, edate).Rows[0]["ID"]));
            }
            else
            {
                DateTime  sdate   = string.IsNullOrEmpty(SDate_T.Text) ? DateTime.Now : DataConverter.CDate(SDate_T.Text);
                DateTime  edate   = string.IsNullOrEmpty(EDate_T.Text) ? DateTime.Now.AddYears(1) : DataConverter.CDate(EDate_T.Text);
                DataTable checkdt = pkBll.SelByDate(Convert.ToInt32(Request.Form["class_rad"]), buser.GetLogin().UserID, sdate, edate);
                if (checkdt.Rows.Count > 0)
                {
                    function.WriteErrMsg("该班级已包含所选时期的课程表,请重新选择时期");
                }
                pkMod.SDate = DataConverter.CDate(sdate);
                pkMod.EDate = DataConverter.CDate(edate);
            }
            pkMod.Config   = Json_Hid.Value;
            pkMod.UserID   = buser.GetLogin().UserID;
            pkMod.CDate    = DateTime.Now;
            pkMod.Ownclass = ClassID > 0 ? ClassID : DataConverter.CLng(Request.Form["class_rad"]);
            pkMod.TechIDS  = Request.Form["idchk"];
            if (ClassID > 0)
            {
                pkBll.UpdateByID(pkMod);
            }
            else
            {
                pkBll.Insert(pkMod);
            }
            function.WriteSuccessMsg("保存成功");
        }