Exemplo n.º 1
0
 private void ShowMasterWorks()
 {
     if (Request.QueryString["Cid"] != null)
     {
         int Cid = Int32.Parse(Request.QueryString["Cid"].ToString());
         LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
         DLworks.DataSource = wbll.ShowCourseGoodWorks(Cid);//显示该学案所有优秀作品
         DLworks.DataBind();
         string ctitle = "";
         if (Request.QueryString["Ctitle"] != null)
         {
             ctitle = Request.QueryString["Ctitle"].ToString();
         }
         if (DLworks.Items.Count > 0)
         {
             Labelmsg.Text = "[" + ctitle + "] 作品数:" + DLworks.Items.Count.ToString() + "件";
         }
         else
         {
             Labelmsg.Text = "暂无推荐作品!";
         }
     }
     else
     {
         Labelmsg.Text = "请选择右侧课节!";
     }
 }
Exemplo n.º 2
0
    private void showWorks()
    {
        string midselect = Rblmission.SelectedValue;
        string cidselect = Rblcourse.SelectedValue;

        if (!string.IsNullOrEmpty(midselect) && !string.IsNullOrEmpty(cidselect))
        {
            string yearselect          = Rblyear.SelectedValue;
            string gradeselect         = Rblgrade.SelectedValue;
            string classselect         = Rblclass.SelectedValue;
            string termselect          = Rblterm.SelectedValue;
            string displaymodel        = Rbldisplay.SelectedValue;
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            string ctitle = cbll.GetTitle(Int32.Parse(cidselect));
            LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission();
            string mtitle = mbll.GetMissionTitle(Int32.Parse(midselect));
            LabelTitle.Text = "【" + ctitle + "】" + mtitle;
            LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
            switch (displaymodel)
            {
            case "1":
                DLworks.DataSource = wbll.ShowWclassWorks(Int32.Parse(yearselect), Int32.Parse(gradeselect), Int32.Parse(classselect), Int32.Parse(termselect), Int32.Parse(midselect));
                DLworks.DataBind();
                divlist.Visible  = true;
                divview.Visible  = false;
                Literal1.Visible = false;
                break;

            case "2":
                DDLstore.DataSource     = wbll.ShowWclassWorks(Int32.Parse(yearselect), Int32.Parse(gradeselect), Int32.Parse(classselect), Int32.Parse(termselect), Int32.Parse(midselect));
                DDLstore.DataTextField  = "Wname";
                DDLstore.DataValueField = "Wurl";
                DDLstore.DataBind();
                divlist.Visible  = false;
                divview.Visible  = true;
                Literal1.Visible = true;
                if (DDLstore.Items.Count > 0)
                {
                    DDLstore.SelectedIndex = 0;
                    showflash();
                }
                break;
            }
        }
        else
        {
            LabelTitle.Text  = "没有作品!";
            divlist.Visible  = false;
            divview.Visible  = false;
            Literal1.Visible = false;
        }
    }