public ActionResult Login(string userNo, string userPwd)
 {
     if (!string.IsNullOrWhiteSpace(userNo) && !string.IsNullOrWhiteSpace(userPwd))
     {
         UserAuthorize.Login(userNo, userPwd, this);
     }
     return(View());
 }
 private void BtnLogin_Click(object sender, EventArgs e)
 {
     if (this.TxtEmpID.Text == "" || this.TxtPassword.Text == "")
     {
         this.LblError.Text = "Please enter user ID and password.";
         return;
     }
     try
     {
         int.Parse(this.TxtEmpID.Text);
     }
     catch (Exception exception)
     {
         this.LblError.Text = "Your user ID is wrong format.";
         return;
     }
     if (UserAuthorize.Login(this, this.TxtEmpID.Text, this.TxtPassword.Text))
     {
         base.Response.Redirect(Pages.Url(this, Pages.HOME_PAGE));
         return;
     }
     this.LblError.Text = "Your user ID or password is wrong. Or you don't have authorize to access.";
 }