void checklogin() { if ((UserName.Text.ToString() == "Admin") && (Password.Text.ToString() == "123")) { label3.Text = ""; UserName.Text = ""; Password.Text = ""; Form ss = new Administrator(); this.Hide(); notifyIcon1.Visible = true; ss.Activate(); ss.Show(); } else if ((UserName.Text.ToString() == "Data") && (Password.Text.ToString() == "123")) { label3.Text = ""; UserName.Text = ""; Password.Text = ""; Form ss = new DataEntry(); this.Hide(); notifyIcon1.Visible = true; ss.Show(); } else if ((UserName.Text.ToString() == "counter") && (Password.Text == "123")) { label3.Text = ""; UserName.Text = ""; Password.Text = ""; Form ss = new Select_Cashier(); this.Hide(); notifyIcon1.Visible = true; ss.Show(); } else { label3.Text = "Invalid User Name or Password"; UserName.Text = ""; Password.Text = ""; UserName.Focus(); } }