コード例 #1
0
    private string surveyClassView(int Yyear, int Ygrade, int Yclass, int Yterm, int Ycid, int Yvid)
    {
        string str = "";

        LearnSite.BLL.SurveyClass   Ycbll   = new LearnSite.BLL.SurveyClass();
        LearnSite.Model.SurveyClass ycmodel = new LearnSite.Model.SurveyClass();
        ycmodel = Ycbll.GetModelByClass(Yyear, Ygrade, Yclass, Yterm, Ycid, Yvid);
        if (ycmodel != null)
        {
            str          = ycmodel.Yselect.ToString() + "|" + ycmodel.Ycount.ToString();
            Lbscore.Text = ycmodel.Yscore.ToString();
        }
        return(str);
    }
コード例 #2
0
    private void surveyClass()
    {
        if (Request.QueryString["Vid"] != null && Request.QueryString["Cid"] != null)
        {
            int syear  = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString());
            int sgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
            int sclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());
            int sterm  = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["ThisTerm"].ToString());
            int vid    = Int32.Parse(Request.QueryString["Vid"].ToString());
            int cid    = Int32.Parse(Request.QueryString["Cid"].ToString());
            LearnSite.BLL.SurveyFeedback fbll = new LearnSite.BLL.SurveyFeedback();
            string allselect = fbll.GetClassFselect(sgrade, sclass, vid);
            if (!string.IsNullOrEmpty(allselect))
            {
                LearnSite.BLL.SurveyItem mbll = new LearnSite.BLL.SurveyItem();
                itemandcount = mbll.GetListItemAndCount(vid, allselect);
                // LearnSite.Common.WordProcess.Alert(itemandcount, this.Page);//调试信息

                string[] itemcountStr = itemandcount.Split('|');
                LearnSite.Model.SurveyClass ymodel = new LearnSite.Model.SurveyClass();
                ymodel.Ycid   = cid;
                ymodel.Yclass = sclass;
                ymodel.Ycount = itemcountStr[1].ToString();
                ymodel.Ydate  = DateTime.Now;
                ymodel.Ygrade = sgrade;
                int yscore = fbll.GetClassYscore(syear, sgrade, sclass, sterm, vid);
                ymodel.Yscore  = yscore;
                Lbscore.Text   = yscore.ToString();
                ymodel.Yselect = itemcountStr[0].ToString();
                ymodel.Yterm   = sterm;
                ymodel.Yvid    = vid;
                ymodel.Yyear   = syear;
                LearnSite.BLL.SurveyClass ybll = new LearnSite.BLL.SurveyClass();
                int yid = ybll.ExistsClass(syear, sgrade, sclass, sterm, vid);
                if (yid > 0)
                {
                    //更新
                    ymodel.Yid = yid;
                    ybll.UpdateClass(ymodel);
                }
                else
                {
                    ybll.Add(ymodel);
                }
            }
        }
    }