|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DocumentBaseLibrary;
namespace DocumentUserApplication
{
public partial class frmLogin : Form
{
public frmLogin()
{
InitializeComponent();
}
private void btnLogin_Click(object sender, EventArgs e)
{
if (ValidateLogin())
{
User.CurrentUser.UserName = this.txtLoginuser.Text.Trim().ToLower();
frmMain _frmMain = new frmMain();
_frmMain.Show();
this.Hide();
}
else
{
this.lblMessage.Visible = true;
this.lblMessage.Text = "Invalid user name";
}
}
private bool ValidateLogin()
{
if (string.IsNullOrEmpty(this.txtLoginuser.Text)) return false;
else return true;
}
private void frmLogin_Load(object sender, EventArgs e)
{
this.lblMessage.Visible = false;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.