Exemplo n.º 1
0
    private void ShowStudent()
    {
        int mySid  = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sid"].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());

        Labelip.Text = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["LoginIp"].ToString();
        snum.Text    = Server.UrlDecode(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString());
        sclass.Text  = Sgrade.ToString() + "." + Sclass.ToString() + "班";
        sname.Text   = Server.UrlDecode(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sname"].ToString());
        string ssex = Server.UrlDecode(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sex"].ToString());

        sscore.Text    = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sscore"].ToString();
        sattitude.Text = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sattitude"].ToString();
        LearnSite.BLL.Students dbll = new LearnSite.BLL.Students();
        sleadername.Text = Server.UrlDecode(dbll.GetLeader(mySid));
        string murl = LearnSite.Common.Photo.GetStudentPhotoUrl(snum.Text, ssex);

        Imageface.ImageUrl = murl + "?temp=" + DateTime.Now.Millisecond.ToString();
        LabelRank.Text     = Server.UrlDecode(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["RankImage"].ToString());
        int myscores = int.Parse(sscore.Text);

        LabelRank.ToolTip = "你当前的等级为:" + myscores / 3 + "级";

        LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
        Session["myClassCid"] = rbll.GetRcid(Sgrade, Sclass);
    }
Exemplo n.º 2
0
    private void ShowStudent()
    {
        int mySid  = cook.Sid;
        int Sgrade = cook.Sgrade;
        int Sclass = cook.Sclass;

        Labelip.Text = cook.LoginIp;
        snum.Text    = cook.Snum;
        sclass.Text  = Sgrade.ToString() + "." + Sclass.ToString() + "班";
        sname.Text   = Server.UrlDecode(cook.Sname);
        string ssex = Server.UrlDecode(cook.Sex);

        sscore.Text    = cook.Sscore.ToString();
        sattitude.Text = cook.Sattitude.ToString();
        LearnSite.BLL.Students dbll = new LearnSite.BLL.Students();
        sleadername.Text = Server.UrlDecode(dbll.GetLeader(mySid));
        string murl = LearnSite.Common.Photo.GetStudentPhotoUrl(snum.Text, ssex);

        Imageface.ImageUrl = murl + "?temp=" + DateTime.Now.Millisecond.ToString();
        LabelRank.Text     = Server.UrlDecode(cook.RankImage);
        int myscores = int.Parse(sscore.Text);

        LabelRank.ToolTip = "你当前的等级为:" + myscores / 3 + "级";

        LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
        Session["myClassCid"] = rbll.GetRcid(Sgrade, Sclass);
    }
Exemplo n.º 3
0
    private int GetCid()
    {
        if (Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname] != null)
        {
            LearnSite.Model.Cook cook = new LearnSite.Model.Cook();

            LearnSite.BLL.Room rbll   = new LearnSite.BLL.Room();
            string             result = rbll.GetRcid(cook.Sgrade, cook.Sclass);
            if (!string.IsNullOrEmpty(result))
            {
                cid = Int32.Parse(result);
            }
        }
        return(cid);
    }
Exemplo n.º 4
0
    private void ShowMission()
    {
        if (Request.QueryString["id"] != null)
        {
            int wid = Int32.Parse(Request.QueryString["id"].ToString());
            LearnSite.BLL.Works   wbll  = new LearnSite.BLL.Works();
            LearnSite.Model.Works model = new LearnSite.Model.Works();
            string ipwid = "ip" + LearnSite.Common.Computer.MyIp().Replace('.', 'a') + "_" + wid.ToString();
            if (Session[ipwid] == null)
            {
                wbll.UpdateWhit(wid);
                Session[ipwid] = wid;
            }

            model           = wbll.GetModel(wid);
            Id              = wid.ToString();
            Owner           = model.Wname;
            Titles          = model.Wtitle;
            this.Page.Title = Titles + "  " + Owner;
            int Wcid   = model.Wcid.Value;
            int Wgrade = model.Wgrade.Value;

            if (Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname] != null)
            {
                LearnSite.Model.Cook cook = new LearnSite.Model.Cook();

                LearnSite.BLL.Room rbll   = new LearnSite.BLL.Room();
                string             result = rbll.GetRcid(cook.Sgrade, cook.Sclass);
                if (!string.IsNullOrEmpty(result))
                {
                    int cid = Int32.Parse(result);
                    if (cid == Wcid && cook.Sgrade == Wgrade)
                    {
                        //如果是正在上的课节内容,则不显示作品的脚本
                        ViewMode = "true";
                    }
                    if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
                    {
                        ViewMode = "false";
                    }
                }
            }
        }
    }