Esempio n. 1
0
    private void ListWorks()
    {
        string Mid = Request.QueryString["Mid"].ToString();

        LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
        DataListvote.DataSource = wbll.ShowMissionWorksGroup(cook.Sgrade, cook.Sclass, Int32.Parse(Mid), cook.Sgroup); //改回为显示作品
        DataListvote.DataBind();
    }
Esempio n. 2
0
    private void ListWorks()
    {
        string Mid      = Request.QueryString["Mid"].ToString();
        int    MySgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
        int    MySclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());
        int    MySgroup = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgroup"].ToString());

        //int MySyear = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString());
        LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
        DataListvote.DataSource = wbll.ShowMissionWorksGroup(MySgrade, MySclass, Int32.Parse(Mid), MySgroup); //改回为显示作品
        DataListvote.DataBind();
    }
Esempio n. 3
0
 private void ShowSite()
 {
     if (LearnSite.Common.CookieHelp.IsStudentLogin())
     {
         string Wnum     = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();
         string MySgrade = DDLgrade.SelectedValue;
         string MySclass = DDLclass.SelectedValue;
         if (MySgrade != "" && MySclass != "")
         {
             LearnSite.BLL.Webstudy ws = new LearnSite.BLL.Webstudy();
             DataListvote.DataSource = ws.GetAllSite(Int32.Parse(MySgrade), Int32.Parse(MySclass), Wnum);//绑定全班数据
             DataListvote.DataBind();
         }
     }
 }
Esempio n. 4
0
    /// <summary>
    /// 显示信息
    /// </summary>
    private void ShowInfo()
    {
        string Studentnum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();

        int MySgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
        int MySclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());
        int MySyear  = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString());
        int MySgroup = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgroup"].ToString());

        if (MySgroup == 0)
        {
            Labelscope.Text = "全班";
        }
        else
        {
            Labelscope.Text = "组内";
        }
        string Mid = Request.QueryString["Mid"].ToString();

        if (LearnSite.Common.WordProcess.IsNum(Mid))
        {
            LearnSite.Model.Works   wmodel = new LearnSite.Model.Works();
            LearnSite.BLL.Works     ws     = new LearnSite.BLL.Works();
            LearnSite.BLL.Mission   mbll   = new LearnSite.BLL.Mission();
            LearnSite.Model.Mission mModel = new LearnSite.Model.Mission();
            mModel = mbll.GetModel(Int32.Parse(Mid));
            ImageWtype.ImageUrl = "~/Images/FileType/" + mModel.Mfiletype + ".gif";
            Labelmtitle.Text    = "〖" + mModel.Mtitle + "〗";
            LabelMgid.Text      = mModel.Mgid.ToString();
            Labelwmid.Text      = Mid;
            LabelWtype.Text     = mModel.Mfiletype;
            wmodel = ws.GetModelByStu(Int32.Parse(Mid), Studentnum);
            if (wmodel != null)
            {
                DataListvote.DataSource = ws.ShowMissionWorksGroup(MySgrade, MySclass, Int32.Parse(Mid), MySgroup);
                DataListvote.DataBind();
                Labelhow.Text = DataListvote.Items.Count.ToString();
                Labelme.Text  = wmodel.Wvote.ToString();
                string   workIp    = wmodel.Wip;
                string   worknum   = wmodel.Wnum;
                DateTime workdate  = wmodel.Wdate.Value;
                DateTime nowdate   = DateTime.Now;
                bool     worklimit = LearnSite.Common.XmlHelp.GetWorkIpLimit();
                Labelegg.Text     = wmodel.Wegg.ToString();
                Labelwfscore.Text = wmodel.Wfscore.ToString();

                TimeSpan ts      = nowdate - workdate;
                int      lastday = ts.Days;
                Labelwdate.Text = lastday.ToString();///取短日期
                if (lastday < 30)
                {
                    if (showRgaugeSet())
                    {
                        LimitVote();//限制为可预览的投票
                    }
                    else
                    {
                        Labelmsg.Text   = "当前作品互评暂停!";
                        BtnVote.Enabled = false;
                    }
                }
                else
                {
                    Labelmsg.Text   = "一个月前的作品不能再投票了!";
                    BtnVote.Enabled = false;
                }
            }
            else
            {
                if (Studentnum.StartsWith("s"))
                {
                    DataListvote.DataSource = ws.ShowMissionWorksGroup(MySgrade, MySclass, Int32.Parse(Mid), MySgroup);
                    DataListvote.DataBind();
                    Labelhow.Text   = DataListvote.Items.Count.ToString();
                    BtnVote.Enabled = true;
                }
                else
                {
                    Labelmsg.Text   = "您未提交作品,无法互评!";
                    BtnVote.Enabled = false;
                }
            }
        }
    }