コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     B_ARoleAuth.CheckEx(ZLEnum.Auth.content, "ContentMange");
     if (!IsPostBack)
     {
         int      id      = DataConverter.CLng(Request.QueryString["id"]);
         M_Course mcourse = bcourse.GetSelect(id);
         if (mcourse != null && mcourse.id > 0)
         {
             liCoures.Text         = "修改课程";
             txt_Courename.Text    = mcourse.CourseName;
             PYtitle.Text          = mcourse.CoureseThrun;
             txt_Code.Text         = mcourse.CoureseCode;
             hfid.Value            = mcourse.CoureseClass.ToString();
             txtClassname.Text     = GetClassname(mcourse.CoureseClass);
             txt_Creidt.Text       = mcourse.CoureseCredit.ToString();
             rblHot.Checked        = mcourse.Hot == 1 ? true : false;
             txtRemark.Text        = mcourse.CoureseRemark;
             coureId.Value         = mcourse.id.ToString();
             Button2.Enabled       = true;
             Button2.OnClientClick = "location.href='AddCourseware.aspx?CourseID=" + id + "'; return false;";
         }
         else
         {
             liCoures.Text   = "添加课程";
             Button2.Enabled = false;
         }
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li> <li><a href='Papers_System_Manage.aspx'>教育模块</a></li><li><a href='QuestionManage.aspx'>考试管理</a></li><li><a href='CoureseManage.aspx'>课程管理</a></li><li>" + liCoures.Text + "</li>");
         txtClassname.Enabled = false;
     }
 }
コード例 #2
0
ファイル: ExamController.cs プロジェクト: zoomlacms/web049
        public ActionResult AddCourse()
        {
            M_Course    courMod = courBll.GetSelect(Mid);
            C_TreeTlpDP treeMod = GetTreeMod();

            if (courMod.CoureseClass > 0)
            {
                treeMod.seled = courMod.CoureseClass.ToString();
            }
            ViewBag.treeMod = treeMod;
            return(View(courMod));
        }
コード例 #3
0
        private string GetCourese(int courseid)
        {
            M_Course mcourse = bcourse.GetSelect(courseid);

            if (mcourse != null && mcourse.id > 0)
            {
                return(mcourse.CourseName);
            }
            else
            {
                return("");
            }
        }