protected void BtnLogin_Click(object sender, EventArgs e)
 {
     User user = new User();
     user = user.GetActiveUser(txtBoxUsername.Text.Trim(), txtBoxPassword.Text.Trim());
     if (user != null)
     {
         Session["UserId"] = user.Id;
         Session["RoleId"] = user.RoleId;
         Session["DepartmentId"] = user.DepartmentId;
         labelError.Visible = false;
         //Server.Transfer("Default.aspx", false);
         Response.Redirect("Dashboard.aspx", true);
     }
     else
     {
         labelError.Text = "Login Failed. Please check your username or/and password.";
         labelError.Visible = true;
     }
 }