示例#1
0
        private void button_authenticate_Click(object sender, EventArgs e)
        {
            AuthenticationProcedure ap=new AuthenticationProcedure();
            if (textBox_username.Text.Equals("") || textBox_password.Text.Equals(""))
            {
                label_errmsg.Text="Please give your valid username or password!!!";
                label_errmsg.ForeColor=System.Drawing.Color.Red;
            }

            else if(ap.authenticationCheck(textBox_username.Text,textBox_password.Text))
            {
                Home hm=new Home(textBox_username.Text);
                this.Hide();
                hm.Show();
            }

            else
            {
                label_errmsg.Text="Please give your valid username or password!!!";
                label_errmsg.ForeColor=System.Drawing.Color.Red;
            }
        }
示例#2
0
 public AdminHome(Admin admin = null, Home home = null)
 {
     InitializeComponent();
     this.admin = admin;
     this.home  = home;
 }
示例#3
0
 private void homeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.Hide();
     Home hm = new Home();
     hm.Show();
 }