Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UserPassword = Session["Pass"].ToString();
            string GetRegisteredUsersQuery = "select UserName from tbl_users where EnrollNo <> '" + UserEnrollNo + "' and Badge='Student'";

            string[] ColumnName = { "UserName", "EnrollNo" };
            RegisteredUsers = conc.GetAllFromColumn(GetRegisteredUsersQuery, ColumnName);


            if (Session["UserName"] != null)
            {
                UserName       = Session["UserName"].ToString();
                UserBadge      = Session["UserBadge"].ToString();
                UserEnrollNo   = Session["UserEnrollNo"].ToString();
                UserDepartment = Session["UserDepartment"].ToString();
                UserEmail      = Session["UserEmail"].ToString();

                fromUser += UserName;
                GetUserImage(UserName);
            }
            //else
            //    // Response.Redirect("Login.aspx");
            //    ;
            //Page.Header.DataBind();
            this.Header.DataBind();
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string GetRegisteredUsersQuery = "select UserName from tbl_users";

            string[] ColumnName = { "UserName", "EnrollNo" };

            RegisteredUsers = conc.GetAllFromColumn(GetRegisteredUsersQuery, ColumnName);

            if (Session["UserName"] != null)
            {
                UserName       = Session["UserName"].ToString();
                UserBadge      = Session["UserBadge"].ToString();
                UserEnrollNo   = Session["UserEnrollNo"].ToString();
                UserDepartment = Session["UserDepartment"].ToString();
                UserEmail      = Session["UserEmail"].ToString();

                fromUser += UserName;
                GetUserImage(UserName);
            }


            this.Header.DataBind();
        }