Пример #1
0
    /// <summary>
    /// 分开是为了不让学案Cid重取
    /// </summary>
    private void ShowWorks()
    {
        string Hid = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();

        if (Request.QueryString["wGrade"] != null && Request.QueryString["wClass"] != null)
        {
            int Sgrade = Int32.Parse(Request.QueryString["wGrade"].ToString());
            int Sclass = Int32.Parse(Request.QueryString["wClass"].ToString());
            LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
            int    Syear = sbll.GetYear(Sgrade, Sclass);
            string myCid = DDLCid.SelectedValue;
            if (myCid != "" && DDLCid.Items.Count > 0)
            {
                if (DDLmid.SelectedValue != "" && DDLmid.Items.Count > 0)
                {
                    int Wmid = Int32.Parse(DDLmid.SelectedValue);
                    LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
                    ShowDoneWorks(); //独立出来方便刷新
                    Labelcounts.Text = DataListworks.Items.Count.ToString();

                    DataListNoworks.DataSource = wbll.ShowTodayNotWorks(Syear, Sgrade, Sclass, Wmid);//获取今天本班未提交作品的学生列表
                    DataListNoworks.DataBind();

                    Labelmsg.Text = CalculateScores();
                    LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission();
                    string Mfiletype           = mbll.GetMfiletype(Wmid).ToLower();
                    showGroup();//显示小组作品
                    HLautoplay.Visible = false;
                    if (!string.IsNullOrEmpty(Mfiletype))
                    {
                        ImageType.Visible  = true;
                        ImageType.ImageUrl = "~/Images/FileType/" + Mfiletype + ".gif";
                        string urlstr = Sgrade.ToString() + "&Sc=" + Sclass.ToString() + "&Ci=" + myCid + "&Mi=" + Wmid.ToString() + "&Ty=" + Mfiletype;
                        HLautoplay.Visible     = true;
                        HLautoplay.NavigateUrl = "~/Teacher/circleshow.aspx?Sg=" + urlstr;
                        HLautoplay.ImageUrl    = "~/Images/flashauto.png";
                    }
                }
                else
                {
                    ImageType.Visible   = false;
                    HLautoplay.Visible  = false;
                    HLgroupplay.Visible = false;
                }
            }
            else
            {
                Labelmsg.Text     = "没找到发布的学案和活动!";
                ImageType.Visible = false;
            }
        }
    }