protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["userRole"] == null)
            {
                Session["user"] = null;
                Response.Redirect("Login.aspx");
            }
            else if (Session["userRole"].ToString() == "Student")
            {
                Users user = new Users();
                user = (Users)(Session["user"]);
                AchieversBL    bl      = new AchieversBL();
                List <Student> student = bl.getStudent(int.Parse(user.Userid));

                if (student.Count == 1)
                {
                    foreach (Student stu in student)
                    {
                        std = stu;
                    }
                    sgnName.Text = std.StudentName;
                    lblName.Text = std.StudentName;
                }
            }
        }
Exemple #2
0
        protected void btnGetUser_Click(object sender, EventArgs e)
        {
            AchieversBL bl   = new AchieversBL();
            Users       user = bl.GetUserById(txtUserId.Text);

            lblUserName.Text = user.UserName;
            lblPassword.Text = user.Password;
        }
        protected void btn_viewStudentList_Click(object sender, EventArgs e)
        {
            AchieversBL         busL        = new AchieversBL();
            List <StudentGrid1> studentList = new List <StudentGrid1>();

            studentList = busL.GetAllStudentsBySemester(ddlSem.SelectedItem.Text, int.Parse(txt_year.Text));
            grdAllStudents.DataSource = studentList;
            grdAllStudents.DataBind();
            Session["year"] = txt_year.Text;
        }
Exemple #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["userRole"] == null)
     {
         Session["user"] = null;
         Response.Redirect("Login.aspx");
     }
     else if (Session["userRole"].ToString() == "Faculty")
     {
         Users user = new Users();
         user = (Users)(Session["user"]);
         AchieversBL bl = new AchieversBL();
         sgnName.Text = user.FullName;
     }
 }