Example #1
0
    private void ShowTxtForm()
    {
        string Mid = Request.QueryString["Mid"].ToString();

        LearnSite.Model.Cook cook = new LearnSite.Model.Cook();
        int Wsid = cook.Sid;

        if (LearnSite.Common.WordProcess.IsNum(Mid))
        {
            LearnSite.Model.TxtForm tmodel = new LearnSite.Model.TxtForm();
            LearnSite.BLL.TxtForm   tbll   = new LearnSite.BLL.TxtForm();

            tmodel = tbll.GetModel(Int32.Parse(Mid));
            if (tmodel != null)
            {
                LabelMtitle.Text = tmodel.Mtitle;

                LearnSite.Model.TxtFormBack rmodel = new LearnSite.Model.TxtFormBack();
                LearnSite.BLL.TxtFormBack   rbll   = new LearnSite.BLL.TxtFormBack();
                int Rid = rbll.GetRid(Wsid.ToString(), Mid);
                if (Rid > 0)
                {
                    rmodel             = rbll.GetModel(Rid);
                    Mcontent.InnerHtml = HttpUtility.HtmlDecode(rmodel.Rwords);
                }
                else
                {
                    Mcontent.InnerHtml = HttpUtility.HtmlDecode(tmodel.Mcontent);
                }
            }
            Hlresult.NavigateUrl = "~/Student/txtformresult.aspx?Mid=" + Mid;
        }
    }
Example #2
0
    protected void GVtxtform_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string eid = e.CommandArgument.ToString();

        LearnSite.BLL.TxtFormBack kbll = new LearnSite.BLL.TxtFormBack();
        if (e.CommandName == "Good")
        {
            int index = Convert.ToInt32(eid);
            kbll.UpdateScore(index, 2);
            System.Threading.Thread.Sleep(500);
            Showtxtform();
        }
        if (e.CommandName == "Less")
        {
            int index = Convert.ToInt32(eid);
            kbll.UpdateScore(index, -2);
            System.Threading.Thread.Sleep(500);
            Showtxtform();
        }

        if (e.CommandName == "Agree")
        {
            int    index = Convert.ToInt32(eid);
            string sid   = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sid"].ToString();
            if (Session["txtform" + sid] != null)
            {
                int agcount = Int32.Parse(Session["txtform" + sid].ToString());
                if (agcount < 10)
                {
                    if (Session["txtform" + sid + "Agree" + index.ToString()] == null)
                    {
                        Session["txtform" + sid + "Agree" + index.ToString()] = "T";
                        Session["txtform" + sid] = agcount + 1;
                        kbll.UpdateAgree(index);
                        System.Threading.Thread.Sleep(500);
                        Showtxtform();
                    }
                    else
                    {
                        LearnSite.Common.WordProcess.Alert("您已经点赞过了!", this.Page);
                    }
                }
                else
                {
                    LearnSite.Common.WordProcess.Alert("最多点赞9次!", this.Page);
                }
            }
            else
            {
                Session["txtform" + sid] = 1;
                kbll.UpdateAgree(index);
                System.Threading.Thread.Sleep(500);
                Showtxtform();
            }
        }
    }
Example #3
0
    protected void ImageBtngoodall_Click(object sender, ImageClickEventArgs e)
    {
        string Syear  = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString();
        string Sgrade = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString();
        string Sclass = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString();
        string mid    = Request.QueryString["Mid"].ToString();

        LearnSite.BLL.TxtFormBack kbll = new LearnSite.BLL.TxtFormBack();
        kbll.UpdateAllScore(Syear, Sgrade, Sclass, mid, 6);
        System.Threading.Thread.Sleep(500);
        Showtxtform();
    }
Example #4
0
    protected void ImageBtngoodall_Click(object sender, ImageClickEventArgs e)
    {
        int    Syear  = cook.Syear;
        int    Sgrade = cook.Sgrade;
        int    Sclass = cook.Sclass;
        string mid    = Request.QueryString["Mid"].ToString();

        LearnSite.BLL.TxtFormBack kbll = new LearnSite.BLL.TxtFormBack();
        kbll.UpdateAllScore(Syear.ToString(), Sgrade.ToString(), Sclass.ToString(), mid, 6);
        System.Threading.Thread.Sleep(500);
        Showtxtform();
    }
Example #5
0
    private void Showtxtform()
    {
        string Syear  = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString();
        string Sgrade = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString();
        string Sclass = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString();
        string Sid    = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sid"].ToString();
        string mid    = Request.QueryString["Mid"].ToString();

        LearnSite.BLL.TxtFormBack kbll = new LearnSite.BLL.TxtFormBack();
        if (kbll.GetRid(Sid, mid) > 0)
        {
            GVtxtform.DataSource = kbll.GetListclass(Sgrade, Sclass, mid);
            GVtxtform.DataBind();
            Labelreplycount.Text = GVtxtform.Rows.Count.ToString();
            Labelnostu.Text      = kbll.GetUndoStus(Int32.Parse(Sgrade), Int32.Parse(Sclass), Int32.Parse(mid));
        }
        else
        {
            Labelnostu.Text = "您未填写表单,暂时无法查看!";
        }
    }
Example #6
0
    private void Showtxtform()
    {
        int    Syear  = cook.Syear;
        int    Sgrade = cook.Sgrade;
        int    Sclass = cook.Sclass;
        int    Sid    = cook.Sid;
        string mid    = Request.QueryString["Mid"].ToString();

        LearnSite.BLL.TxtFormBack kbll = new LearnSite.BLL.TxtFormBack();
        if (kbll.GetRid(Sid.ToString(), mid) > 0)
        {
            GVtxtform.DataSource = kbll.GetListclass(Sgrade.ToString(), Sclass.ToString(), mid);
            GVtxtform.DataBind();
            Labelreplycount.Text = GVtxtform.Rows.Count.ToString();
            Labelnostu.Text      = kbll.GetUndoStus(Sgrade, Sclass, Int32.Parse(mid));
        }
        else
        {
            Labelnostu.Text = "您未填写表单,暂时无法查看!";
        }
    }
Example #7
0
    private void getoldCids()
    {
        int    Cterm  = cook.ThisTerm;
        int    Cgrade = cook.Sgrade;
        string mySnum = cook.Snum;

        LearnSite.BLL.SurveyFeedback fbll = new LearnSite.BLL.SurveyFeedback();
        string fcids = fbll.ShowStuFeedbackCids(mySnum, Cterm, Cgrade);

        LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
        string wcids             = wbll.ShowStuDoneWorkCids(mySnum, Cterm, Cgrade);

        LearnSite.BLL.TopicReply tbll = new LearnSite.BLL.TopicReply();
        string tcids = tbll.ShowStuDoneReplyCids(mySnum, Cterm, Cgrade);

        LearnSite.BLL.TxtFormBack mbll = new LearnSite.BLL.TxtFormBack();
        string mcids   = mbll.ShowStuDoneBackCids(mySnum, Cterm, Cgrade);
        string allcids = "";

        if (wcids != "")
        {
            allcids = allcids + wcids;
        }
        if (fcids != "")
        {
            allcids = allcids + fcids;
        }
        if (tcids != "")
        {
            allcids = allcids + tcids;
        }
        if (mcids != "")
        {
            allcids = allcids + mcids;
        }
        LabelCids.Text = LearnSite.Common.WordProcess.SimpleWordsNew(allcids);
    }
Example #8
0
    private void getoldCids()
    {
        int    Cterm  = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
        int    Cgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
        string mySnum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();

        LearnSite.BLL.SurveyFeedback fbll = new LearnSite.BLL.SurveyFeedback();
        string fcids = fbll.ShowStuFeedbackCids(mySnum, Cterm, Cgrade);

        LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
        string wcids             = wbll.ShowStuDoneWorkCids(mySnum, Cterm, Cgrade);

        LearnSite.BLL.TopicReply tbll = new LearnSite.BLL.TopicReply();
        string tcids = tbll.ShowStuDoneReplyCids(mySnum, Cterm, Cgrade);

        LearnSite.BLL.TxtFormBack mbll = new LearnSite.BLL.TxtFormBack();
        string mcids   = mbll.ShowStuDoneBackCids(mySnum, Cterm, Cgrade);
        string allcids = "";

        if (wcids != "")
        {
            allcids = allcids + wcids;
        }
        if (fcids != "")
        {
            allcids = allcids + fcids;
        }
        if (tcids != "")
        {
            allcids = allcids + tcids;
        }
        if (mcids != "")
        {
            allcids = allcids + mcids;
        }
        LabelCids.Text = LearnSite.Common.WordProcess.SimpleWordsNew(allcids);
    }
Example #9
0
        /// <summary>
        /// 返回本课的活动、调查、讨论、表单 汇总表
        /// </summary>
        /// <param name="Cid"></param>
        /// <param name="Sgrade"></param>
        /// <param name="Sclass"></param>
        public DataTable CourseTotals(int Cid, int Sgrade, int Sclass)
        {
            Students  sbll   = new Students();
            DataTable dtstus = sbll.GetStudentsSnumSname(Sgrade, Sclass).Tables[0];//学号和姓名

            if (dtstus.Rows.Count > 0)
            {
                ListMenu  lbll   = new ListMenu();
                DataTable dt     = lbll.GetShowedMenu(Cid).Tables[0];
                int       dcount = dt.Rows.Count;
                if (dcount > 0)
                {
                    Works          wbll = new Works();
                    SurveyFeedback fbll = new SurveyFeedback();
                    TopicReply     rbll = new TopicReply();
                    TxtFormBack    xbll = new TxtFormBack();

                    for (int i = 0; i < dcount; i++)
                    {
                        string Ltype     = dt.Rows[i]["Ltype"].ToString();                   //获取学案项目类型:1活动2调查3讨论4表单
                        int    Lxid      = Convert.ToInt32(dt.Rows[i]["Lxid"].ToString());   //获取对应项目ID编号
                        string Ltitle    = dt.Rows[i]["Ltitle"].ToString().Replace(" ", ""); //获取菜单标题
                        string Ltitlestr = "l" + Ltype + "x" + Lxid.ToString();
                        switch (Ltype)
                        {
                        case "1":    //活动
                        case "5":    //编程
                            DataTable dtms = wbll.getScoreList(Lxid, Sgrade, Sclass);
                            if (dtms.Rows.Count > 0)
                            {
                                dtstus.Columns.Add(Ltitlestr, typeof(int));
                                GetScore(dtstus, Ltitlestr, dtms);
                                dtstus.Columns[Ltitlestr].ColumnName = Ltitle;
                            }
                            dtms.Dispose();
                            break;

                        case "2":    //调查
                            DataTable dtsf = fbll.GetClassScore(Lxid, Sgrade, Sclass);
                            if (dtsf.Rows.Count > 0)
                            {
                                dtstus.Columns.Add(Ltitlestr, typeof(int));
                                GetScore(dtstus, Ltitlestr, dtsf);
                                dtstus.Columns[Ltitlestr].ColumnName = Ltitle;
                            }
                            dtsf.Dispose();
                            break;

                        case "3":    //讨论
                            DataTable dttr = rbll.GetClassListScore(Sgrade, Sclass, Lxid);
                            if (dttr.Rows.Count > 0)
                            {
                                dtstus.Columns.Add(Ltitlestr, typeof(int));
                                GetScore(dtstus, Ltitlestr, dttr);
                                dtstus.Columns[Ltitlestr].ColumnName = Ltitle;
                            }
                            dttr.Dispose();
                            break;

                        case "4":    //表单
                            DataTable dttx = xbll.GetClassTxtFormScore(Sgrade, Sclass, Lxid);
                            if (dttx.Rows.Count > 0)
                            {
                                dtstus.Columns.Add(Ltitlestr, typeof(int));
                                GetScore(dtstus, Ltitlestr, dttx);
                                dtstus.Columns[Ltitlestr].ColumnName = Ltitle;
                            }
                            dttx.Dispose();
                            break;
                        }
                    }
                }
                dt.Dispose();
                //汇总
                int cml = dtstus.Columns.Count;
                if (cml > 2)
                {
                    Signin    gbll  = new Signin();
                    DataTable dtatd = gbll.GetClassListQattitude(Sgrade, Sclass, Cid);
                    if (dtatd.Rows.Count > 0)
                    {
                        string clmatd = "clmattitude";
                        dtstus.Columns.Add(clmatd, typeof(int));
                        GetScore(dtstus, clmatd, dtatd);
                        dtstus.Columns[clmatd].ColumnName = "课堂表现";
                        cml = cml + 1;//新增了课堂表现列
                    }
                    dtstus.Columns.Add("汇总", typeof(float));
                    dtTotal(dtstus, cml);
                }
            }
            dtstus.Columns["Snum"].ColumnName  = "学号";
            dtstus.Columns["Sname"].ColumnName = "姓名";
            return(dtstus);
        }