Ejemplo n.º 1
0
 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();
         }
     }
 }
Ejemplo n.º 2
0
    private void showmission()
    {
        string Mcid = Request.QueryString["Mcid"].ToString();
        string Mid = Request.QueryString["Mid"].ToString();

        LearnSite.Model.Mission model = new LearnSite.Model.Mission();
        LearnSite.BLL.Mission mn = new LearnSite.BLL.Mission();

        model = mn.GetModel(Int32.Parse(Mid));
        if (model != null)
        {
            LabelMtitle.Text = model.Mtitle;
            LabelMcid.Text = model.Mcid.ToString();
            Mcontent.InnerHtml = HttpUtility.HtmlDecode(model.Mcontent);
            LabelMdate.Text = model.Mdate.ToString();
            LabelMfiletype.Text = model.Mfiletype;
            ImageType.ImageUrl = "~/Images/FileType/" + LabelMfiletype.Text.ToLower() + ".gif";
            CheckBoxMupload.Checked = model.Mupload;
            LabelMsort.Text = model.Msort.ToString();
            GVmission.DataSource = mn.GetMissions(Int32.Parse(Mcid));
            GVmission.DataBind();
        }
    }