Beispiel #1
0
    private void SetUserName()
    {
        Fannie.Users user = new Fannie.Users();
        string       name = user.GetUserName(id, TypeId);

        Session["user"] = name;
        Response.Cookies["user"].Value = name;
        //HttpCookie cookie = new HttpCookie("login");
        //System.Text.Encoding enc = System.Text.Encoding.GetEncoding("gb2312");
        //cookie["user"] = HttpUtility.UrlEncode(name, enc);
        tvRole.Nodes[0].Text = "桌面" + "(" + name + ")";
    }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.Cookies["id"] != null)
     {
         id = Request.Cookies["id"].Value.ToString();
     }
     if (!IsPostBack)
     {
         GetStuName();
     }
     if (Request.QueryString["sid"] != null)
     {
         sid            = Request.QueryString["sid"].ToString();
         txt_theme.Text = "回复:‘" + Request.QueryString["title"].ToString() + "’的答疑";
         Fannie.Users user = new Fannie.Users();
         tbSendTo.Text      = user.GetUserName(sid, 2);
         ddlTeacher.Visible = false;
     }
 }