Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            PoliceView pv = new PoliceView();

            pv.Show();
        }
Example #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            PoliceView fr = new PoliceView();

            fr.Show();
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            JailManagementDataContext dc = new JailManagementDataContext();
            String userid   = textBox1.Text;
            String password = textBox2.Text;

            Employee emp = dc.Employees.SingleOrDefault(x => x.Password == password & x.User_Id == userid);

            if (emp == null)
            {
                MessageBox.Show("Invalid UserName or Password");
            }
            else
            {
                if (emp.Designation == "Police")
                {
                    this.Hide();
                    PoliceView a = new PoliceView();
                    a.Show();
                }

                else if (emp.Designation == "Jailer")
                {
                    this.Hide();
                    JailerView a = new JailerView();
                    a.Show();
                }
                else if (emp.Designation == "Doctor")
                {
                    this.Hide();
                    DctorView a = new DctorView();
                    a.Show();
                }
                else if (emp.Designation == "Admin")
                {
                    this.Hide();
                    Admin a = new Admin();
                    a.Show();
                }
            }
        }