Esempio n. 1
0
    private void Readwork()
    {
        int Wcid   = Int32.Parse(Request.QueryString["Cid"].ToString());
        int Wclass = Int32.Parse(DDLclass.SelectedValue);

        LearnSite.BLL.Works ws = new LearnSite.BLL.Works();
        DDLstore.DataSource     = ws.GetListNoWcheckWork(Wcid, Wclass);
        DDLstore.DataTextField  = "Sname";
        DDLstore.DataValueField = "Wurl";
        DDLstore.DataBind();
        int curindex = Int32.Parse(lbcurindex.Text);

        if (DDLstore.Items.Count > 0)
        {
            int allindex = DDLstore.Items.Count - 1;
            if (curindex == allindex)
            {
                lbcurindex.Text = "0";
            }
            if (curindex < allindex)
            {
                DDLstore.SelectedIndex = curindex;
            }
        }
    }
Esempio n. 2
0
    private void Readwork()
    {
        string afid = DDLsoft.SelectedValue;

        if (!string.IsNullOrEmpty(afid))
        {
            LearnSite.BLL.Autonomic abll = new LearnSite.BLL.Autonomic();
            DDLstore.DataSource     = abll.GetListCircleNomic(Int32.Parse(afid));
            DDLstore.DataTextField  = "Aname";
            DDLstore.DataValueField = "Aurl";
            DDLstore.DataBind();
            int curindex = Int32.Parse(lbcurindex.Text);
            if (DDLstore.Items.Count > 0)
            {
                int allindex = DDLstore.Items.Count - 1;
                if (curindex == allindex)
                {
                    lbcurindex.Text = "0";
                }
                if (curindex < allindex)
                {
                    DDLstore.SelectedIndex = curindex;
                }
            }
        }
    }
Esempio n. 3
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;
        }
    }
Esempio n. 4
0
    private void ReadWork()
    {
        if (Request.QueryString["Snum"] != null)
        {
            string Snum = Request.QueryString["Snum"].ToString();
            LearnSite.Model.Students smodel = new LearnSite.Model.Students();
            LearnSite.BLL.Students   sbll   = new LearnSite.BLL.Students();
            smodel           = sbll.SnumGetModel(Snum);
            LabelSnum.Text   = Snum;
            LabelSname.Text  = smodel.Sname;
            LabelWscore.Text = smodel.Sscore.ToString();
            int wgrade = smodel.Sgrade.Value;
            if (Request.QueryString["Sgrade"] != null)
            {
                wgrade = Int32.Parse(Request.QueryString["Sgrade"].ToString());
            }
            int wterm = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
            if (Request.QueryString["Sterm"] != null)
            {
                wterm = Int32.Parse(Request.QueryString["Sterm"].ToString());
            }

            LearnSite.BLL.Works ws = new LearnSite.BLL.Works();
            DDLstore.DataSource     = ws.ShowThisTermWorksCircle(Snum, wgrade, wterm);
            DDLstore.DataTextField  = "Mtitle";
            DDLstore.DataValueField = "Wurl";
            DDLstore.DataBind();
            int curindex = Int32.Parse(lbcurindex.Text);
            if (DDLstore.Items.Count > 0)
            {
                int allindex = DDLstore.Items.Count - 1;
                if (curindex == allindex)
                {
                    lbcurindex.Text = "0";
                }
                if (curindex < allindex)
                {
                    DDLstore.SelectedIndex = curindex;
                }
            }
        }
    }
Esempio n. 5
0
 private void Readwork()
 {
     if (Request.QueryString["Sg"] != null && Request.QueryString["Sc"] != null && Request.QueryString["Ci"] != null && Request.QueryString["Mi"] != null)
     {
         int Sgrade = Int32.Parse(Request.QueryString["Sg"].ToString());
         int Sclass = Int32.Parse(Request.QueryString["Sc"].ToString());
         int Cid    = Int32.Parse(Request.QueryString["Ci"].ToString());
         int Mid    = Int32.Parse(Request.QueryString["Mi"].ToString());
         int Wscore = 0;
         if (CkselectG.Checked)
         {
             Wscore = 12;
         }
         if (CheckselectA.Checked)
         {
             Wscore = 10;
         }
         LearnSite.BLL.Works ws = new LearnSite.BLL.Works();
         DDLstore.DataSource     = ws.ShowCircleWorksSelect(Sgrade, Sclass, Cid, Mid, Wscore);
         DDLstore.DataTextField  = "Sname";
         DDLstore.DataValueField = "Wurl";
         DDLstore.DataBind();
         int curindex = Int32.Parse(lbcurindex.Text);
         if (DDLstore.Items.Count > 0)
         {
             int allindex = DDLstore.Items.Count - 1;
             if (curindex == allindex)
             {
                 lbcurindex.Text = "0";
             }
             if (curindex < allindex)
             {
                 DDLstore.SelectedIndex = curindex;
             }
         }
     }
 }
Esempio n. 6
0
    private void ShowCourseInfo()
    {
        if (Request.QueryString["Cid"] != null)
        {
            int Cid = Int32.Parse(Request.QueryString["Cid"].ToString());
            LearnSite.Model.Courses course = new LearnSite.Model.Courses();
            LearnSite.BLL.Courses   bll    = new LearnSite.BLL.Courses();
            course          = bll.GetModel(Cid);
            Labeltitle.Text = course.Ctitle;
            //Wid,Wurl,Wname,Wscore
            LearnSite.BLL.Works wbll   = new LearnSite.BLL.Works();
            DataTable           dt     = wbll.GetCourseWorks(Cid);
            DataTable           dtgood = dt.Clone();
            int     count  = dt.Rows.Count;
            int     g      = 0;
            int     a      = 0;
            int     b      = 0;
            int     c      = 0;
            int     d      = 0;
            int     e      = 0;
            int     f      = 0;
            decimal all    = 0;
            decimal averge = 0;
            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    int wscore = Int32.Parse(dt.Rows[i][3].ToString());
                    all += wscore;
                    switch (wscore)
                    {
                    case 12:
                        g++;
                        dtgood.ImportRow(dt.Rows[i]);
                        break;

                    case 10:
                        a++;
                        break;

                    case 8:
                        b++;
                        break;

                    case 6:
                        c++;
                        break;

                    case 4:
                        d++;
                        break;

                    case 2:
                        e++;
                        break;

                    case 0:
                        f++;
                        break;
                    }
                }
                averge = all / count;

                DDLstore.DataSource     = dtgood;
                DDLstore.DataTextField  = "Wname";
                DDLstore.DataValueField = "Wurl";
                DDLstore.DataBind();
                lbcount.Text = count.ToString();
                if (DDLstore.Items.Count > 0)
                {
                    DDLstore.SelectedIndex = 0;
                    ShowFlash();
                    divview.Visible = true;
                }
                else
                {
                    Literal1.Text = "暂无评分G的收藏作品!";
                }
            }
            Labeldistribution.Text = "作品总数:" + count + " 评分分布:G " + g + " . A " + a + " . B " + b + " . C " + c + " . D " + d + " . E" + e + " 作品均分:" + averge.ToString("f1");
            dt.Dispose();
        }
    }