Ejemplo n.º 1
0
 private void CksMax()
 {
     int Cterm = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
     int Cobj = Int32.Parse(DDLcobj.SelectedValue);
     LearnSite.BLL.Courses bll = new LearnSite.BLL.Courses();
     int cksn = bll.CksMaxValue(Cterm, Cobj);
     int courseperiod = Int32.Parse(LearnSite.Common.XmlHelp.GetTypeName("CoursePeriod"));
     if (cksn > courseperiod)
     {
         BtnCreate.Enabled = false;
         Labelmsg.Text = "超过本学期设定的课时数! <br/>请到website.xml中修改CoursePeriod值!";
     }
     else
     {
         DDLCks.SelectedValue = bll.CksMaxValue(Cterm, Cobj).ToString();
         BtnCreate.Enabled = true;
         Labelmsg.Text = "";
     }
 }
Ejemplo n.º 2
0
 private void CksMax()
 {
     if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         int Cterm = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
         int Cobj  = Int32.Parse(DDLcobj.SelectedValue);
         int Chid  = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString());//教师编号
         LearnSite.BLL.Courses bll = new LearnSite.BLL.Courses();
         int cksn         = bll.CksMaxValue(Cterm, Cobj, Chid);
         int courseperiod = Int32.Parse(LearnSite.Common.XmlHelp.GetTypeName("CoursePeriod"));
         if (cksn > courseperiod)
         {
             BtnCreate.Enabled = false;
             Labelmsg.Text     = "超过本学期设定的课时数! <br/>请到website.xml中修改CoursePeriod值!";
         }
         else
         {
             DDLCks.SelectedValue = bll.CksMaxValue(Cterm, Cobj, Chid).ToString();
             BtnCreate.Enabled    = true;
             Labelmsg.Text        = "";
         }
     }
 }