Ejemplo n.º 1
0
    private void showtopic()
    {
        if (Request.QueryString["Tid"] != null)
        {
            int tid = Int32.Parse(Request.QueryString["Tid"].ToString());
            LearnSite.BLL.TopicDiscuss   tbll   = new LearnSite.BLL.TopicDiscuss();
            LearnSite.Model.TopicDiscuss tmodel = new LearnSite.Model.TopicDiscuss();
            tmodel              = tbll.GetModel(tid);//获取主题讨论实体
            Labeltopic.Text     = tmodel.Ttitle;
            TcloseCheck.Checked = tmodel.Tclose;

            Topics.InnerHtml = "<br/>&nbsp;讨论内容:" + HttpUtility.HtmlDecode(tmodel.Tcontent);
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            Labelcourse.Text = cbll.GetTitle(tmodel.Tcid.Value);//获取学案名称

            LearnSite.BLL.TopicReply rbll = new LearnSite.BLL.TopicReply();

            TopicsResult.InnerHtml = "<br/>&nbsp;老师总结:";

            if (tmodel.Tclose)
            {
                Btnword.Enabled   = false;//不可发表讨论
                Btnclock.ImageUrl = "~/Images/clockred.gif" + "?temp=" + DateTime.Now.Millisecond.ToString();
                Btnclock.ToolTip  = "当前主题讨论关闭!";
            }
            else
            {
                Btnword.Enabled   = true;//可发表讨论
                Btnclock.ImageUrl = "~/Images/clock.gif" + "?temp=" + DateTime.Now.Millisecond.ToString();
                Btnclock.ToolTip  = "当前主题讨论开启!";
            }
        }
    }
Ejemplo n.º 2
0
 private void ShowTopic()
 {
     if (Request.QueryString["Tid"] != null)
     {
         int Tid = Int32.Parse(Request.QueryString["Tid"].ToString());
         LearnSite.BLL.TopicDiscuss   bll   = new LearnSite.BLL.TopicDiscuss();
         LearnSite.Model.TopicDiscuss model = new LearnSite.Model.TopicDiscuss();
         model            = bll.GetModel(Tid);
         Labeltid.Text    = model.Tid.ToString();
         LabelTtitle.Text = model.Ttitle;
         LabelMcid.Text   = model.Tcid.ToString();
         LabelTdate.Text  = model.Tdate.ToString();
         bool isClose = model.Tclose;
         if (isClose)
         {
             Btnclock.ImageUrl = "~/Images/clockred.gif" + "?temp=" + DateTime.Now.Millisecond.ToString();
             Btnclock.ToolTip  = "讨论暂停!";
         }
         else
         {
             Btnclock.ImageUrl = "~/Images/clock.gif" + "?temp=" + DateTime.Now.Millisecond.ToString();
             Btnclock.ToolTip  = "讨论开启!";
         }
         Tcontent.InnerHtml = HttpUtility.HtmlDecode(model.Tcontent);
     }
 }
Ejemplo n.º 3
0
 private void showtopic()
 {
     if (Request.QueryString["Tid"] != null)
     {
         int tid = Int32.Parse(Request.QueryString["Tid"]);
         LearnSite.BLL.TopicDiscuss   bll   = new LearnSite.BLL.TopicDiscuss();
         LearnSite.Model.TopicDiscuss model = new LearnSite.Model.TopicDiscuss();
         model              = bll.GetModel(tid);
         Texttitle.Text     = model.Ttitle;
         mcontent.InnerText = HttpUtility.HtmlDecode(model.Tcontent);
         CheckClose.Checked = model.Tclose;
     }
 }
Ejemplo n.º 4
0
    private void showtopic()
    {
        if (Request.QueryString["Tid"] != null)
        {
            int tid = Int32.Parse(Request.QueryString["Tid"].ToString());
            LearnSite.BLL.TopicDiscuss   tbll   = new LearnSite.BLL.TopicDiscuss();
            LearnSite.Model.TopicDiscuss tmodel = new LearnSite.Model.TopicDiscuss();
            tmodel              = tbll.GetModel(tid);//获取主题讨论实体
            Labeltopic.Text     = tmodel.Ttitle;
            TcloseCheck.Checked = tmodel.Tclose;

            Topics.InnerHtml = "讨论内容:" + HttpUtility.HtmlDecode(tmodel.Tcontent);
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            string mynum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();

            int sgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
            int sclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());
            int syear  = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString());
            int hid    = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Rhid"].ToString());

            string teasnum = "s" + hid + syear.ToString() + sgrade.ToString() + sclass.ToString();
            LearnSite.BLL.TopicReply rbll = new LearnSite.BLL.TopicReply();
            string treply = rbll.getteareply(tid, teasnum);
            TopicsResult.InnerHtml = "老师总结:" + HttpUtility.HtmlDecode(treply);

            if (mynum == teasnum)
            {
                Btnclock.Enabled        = true;
                Btnword.Text            = "老师总结";
                ImageBtngoodall.Visible = true;
            }
            if (tmodel.Tclose)
            {
                Btnword.Enabled   = false;//不可发表讨论
                Btnclock.ImageUrl = "~/Images/clockred.gif" + "?temp=" + DateTime.Now.Millisecond.ToString();
                Btnclock.ToolTip  = "主题讨论暂停!";
            }
            else
            {
                Btnword.Enabled   = true;//可发表讨论
                Btnclock.ImageUrl = "~/Images/clock.gif" + "?temp=" + DateTime.Now.Millisecond.ToString();
                Btnclock.ToolTip  = "主题讨论开启!";
            }
        }
    }