Beispiel #1
0
    private void ShowCourse()
    {
        string Cid = Request.QueryString["Cid"].ToString();

        if (LearnSite.Common.WordProcess.IsNum(Cid))
        {
            LearnSite.Model.Courses model = new LearnSite.Model.Courses();
            LearnSite.BLL.Courses   cs    = new LearnSite.BLL.Courses();
            model = cs.GetModel(Int32.Parse(Cid));
            if (model != null)
            {
                LabelCtitle.Text   = model.Ctitle;
                LabelCdate.Text    = model.Cdate.ToString();
                LabelCclass.Text   = model.Cclass;
                LabelCobj.Text     = model.Cobj.ToString();
                LabelCterm.Text    = model.Cterm.ToString();
                LabelCks.Text      = model.Cks.ToString();
                Ccontent.InnerHtml = HttpUtility.HtmlDecode(model.Ccontent);
            }
            else
            {
                Ccontent.InnerHtml = "此学案不存在!";
            }
            LabelWelcome.Text = "您好,欢迎开始本课旅程!";
        }
    }
Beispiel #2
0
 private void ShowCourseFiled()
 {
     if (Request.QueryString["Mcid"] != null)
     {
         int Mcid = Int32.Parse(Request.QueryString["Mcid"].ToString());
         LearnSite.BLL.Courses   cbll   = new LearnSite.BLL.Courses();
         LearnSite.Model.Courses cmodel = new LearnSite.Model.Courses();
         cmodel = cbll.GetModel(Mcid);
         DDLmfiletype.SelectedValue = cmodel.Cfiletype;
     }
 }
    private void Showcourse()
    {
        int myCid = Int32.Parse(Request.QueryString["Cid"].ToString());

        LearnSite.Model.Courses course = new LearnSite.Model.Courses();
        LearnSite.BLL.Courses   cbll   = new LearnSite.BLL.Courses();
        course                 = cbll.GetModel(myCid);
        Texttitle.Text         = course.Ctitle;
        DDLclass.SelectedValue = course.Cclass;
        DDLcobj.SelectedValue  = course.Cobj.ToString();
        DDLCterm.SelectedValue = course.Cterm.ToString();
        DDLCks.SelectedValue   = course.Cks.ToString();
        mcontent.InnerText     = HttpUtility.HtmlDecode(course.Ccontent);
        CheckPublish.Checked   = course.Cpublish;
    }
Beispiel #4
0
 private void showcourse()
 {
     if (Request.QueryString["Cid"] != null)
     {
         string Cid = Request.QueryString["Cid"].ToString();
         LearnSite.Model.Courses model = new LearnSite.Model.Courses();
         LearnSite.BLL.Courses   cs    = new LearnSite.BLL.Courses();
         model = cs.GetModel(Int32.Parse(Cid));
         if (model != null)
         {
             LabelCtitle.Text   = model.Ctitle;
             LabelCdate.Text    = model.Cdate.ToString();
             LabelCclass.Text   = model.Cclass;
             LabelCobj.Text     = model.Cobj.ToString();
             LabelCterm.Text    = model.Cterm.ToString();
             LabelCks.Text      = model.Cks.ToString();
             Ccontent.InnerHtml = HttpUtility.HtmlDecode(model.Ccontent);
         }
     }
 }
 private void showcourse(string Cid)
 {
     if (LearnSite.Common.WordProcess.IsNum(Cid))
     {
         LearnSite.Model.Courses model = new LearnSite.Model.Courses();
         LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
         model = cs.GetModel(Int32.Parse(Cid));
         if (model != null)
         {
             LabelCtitle.Text = model.Ctitle;
             LabelCdate.Text = model.Cdate.ToString();
             LabelCclass.Text = model.Cclass;
             LabelCobj.Text = model.Cobj.ToString();
             LabelCterm.Text = model.Cterm.ToString();
             LabelCks.Text = model.Cks.ToString();
             Ccontent.InnerHtml = HttpUtility.HtmlDecode(model.Ccontent);
             LearnSite.BLL.Mission mission = new LearnSite.BLL.Mission();
             GVmission.DataSource = mission.GetMissions(Int32.Parse(Cid));
             GVmission.DataBind();
         }
     }
 }
 private void ShowCourse()
 {
     string Cid = Request.QueryString["Cid"].ToString();
     if (LearnSite.Common.WordProcess.IsNum(Cid))
     {
         LearnSite.Model.Courses model = new LearnSite.Model.Courses();
         LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
         model = cs.GetModel(Int32.Parse(Cid));
         if (model != null)
         {
             LabelCtitle.Text = model.Ctitle;
             LabelCdate.Text = model.Cdate.ToString();
             LabelCclass.Text = model.Cclass;
             LabelCobj.Text = model.Cobj.ToString();
             LabelCterm.Text = model.Cterm.ToString();
             LabelCks.Text = model.Cks.ToString();
             Ccontent.InnerHtml = HttpUtility.HtmlDecode(model.Ccontent);
         }
         else
         {
             Ccontent.InnerHtml = "此课程不存在!";
         }
     }
 }
 private void Showcourse()
 {
     LearnSite.Model.Courses course = new LearnSite.Model.Courses();
         LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
         course = cbll.GetModel(GetCid);
         Texttitle.Text = course.Ctitle;
         DDLclass.SelectedValue = course.Cclass;
         DDLcobj.SelectedValue = course.Cobj.ToString();
         DDLCterm.SelectedValue = course.Cterm.ToString();
         DDLCks.SelectedValue = course.Cks.ToString();
         FCKeditor1.Value =HttpUtility.HtmlDecode( course.Ccontent);
         CheckPublish.Checked = course.Cpublish;
 }
Beispiel #8
0
    private void ShowCourseInfo()
    {
        if (Request.QueryString["Cid"] != null)
        {
            int Cid = Int32.Parse(Request.QueryString["Cid"].ToString());
            LearnSite.Model.Courses course = new LearnSite.Model.Courses();
            LearnSite.BLL.Courses   bll    = new LearnSite.BLL.Courses();
            course          = bll.GetModel(Cid);
            Labeltitle.Text = course.Ctitle;
            //Wid,Wurl,Wname,Wscore
            LearnSite.BLL.Works wbll   = new LearnSite.BLL.Works();
            DataTable           dt     = wbll.GetCourseWorks(Cid);
            DataTable           dtgood = dt.Clone();
            int     count  = dt.Rows.Count;
            int     g      = 0;
            int     a      = 0;
            int     b      = 0;
            int     c      = 0;
            int     d      = 0;
            int     e      = 0;
            int     f      = 0;
            decimal all    = 0;
            decimal averge = 0;
            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    int wscore = Int32.Parse(dt.Rows[i][3].ToString());
                    all += wscore;
                    switch (wscore)
                    {
                    case 12:
                        g++;
                        dtgood.ImportRow(dt.Rows[i]);
                        break;

                    case 10:
                        a++;
                        break;

                    case 8:
                        b++;
                        break;

                    case 6:
                        c++;
                        break;

                    case 4:
                        d++;
                        break;

                    case 2:
                        e++;
                        break;

                    case 0:
                        f++;
                        break;
                    }
                }
                averge = all / count;

                DDLstore.DataSource     = dtgood;
                DDLstore.DataTextField  = "Wname";
                DDLstore.DataValueField = "Wurl";
                DDLstore.DataBind();
                lbcount.Text = count.ToString();
                if (DDLstore.Items.Count > 0)
                {
                    DDLstore.SelectedIndex = 0;
                    ShowFlash();
                    divview.Visible = true;
                }
                else
                {
                    Literal1.Text = "暂无评分G的收藏作品!";
                }
            }
            Labeldistribution.Text = "作品总数:" + count + " 评分分布:G " + g + " . A " + a + " . B " + b + " . C " + c + " . D " + d + " . E" + e + " 作品均分:" + averge.ToString("f1");
            dt.Dispose();
        }
    }
 private void ShowCourseFiled()
 {
     if (Request.QueryString["Mcid"] != null)
     {
         int Mcid = Int32.Parse(Request.QueryString["Mcid"].ToString());
         LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
         LearnSite.Model.Courses cmodel = new LearnSite.Model.Courses();
         cmodel = cbll.GetModel(Mcid);
         DDLmfiletype.SelectedValue = cmodel.Cfiletype;
     }
 }