Exemplo n.º 1
0
 private void signin_Click(object sender, EventArgs e)
 {
     ClLogin log1 = new ClLogin();
     string ret = log1.FuncLog(un.Text, pass.Text, cb1.Text);
     if (ret == "false")
     {
         MessageBox.Show (this,"Login Unsuccessful");
     }else if(ret == "true")
     {
         if (cb1.Text == "Administrator")
         {
             this.Hide();
             admin a = new admin(un.Text,this);
             a.Show();
         }
             if(cb1.Text == "Student")
             {
                 MessageBox.Show(this, "0");
         //        this.Hide();
         //        student.Show();
             }
             if (cb1.Text == "Faculty")
             {
                 MessageBox.Show (this,"1");
         //        this.Hide();
         //        faculty.Show();
             }
     }else
     {
             if (ret == "Librarian")
             {
                 this.Hide();
                 Librarian Librar = new Librarian(this);
                 Librar.Show();
             }
             else
             if (ret == "HostelAttendant")
             {
                     this.Hide();
                     HostelAttendant ha = new HostelAttendant(this);
                     ha.Show();
             }
     }
     log1 = null;
 }
 public Admin_Student(string nm,admin adm)
 {
     name = nm;
     ad = adm;
     InitializeComponent();
 }
 public Admin_Staff(admin ad1)
 {
     ad = ad1;
     InitializeComponent();
 }
 public Admin_Admin(admin ad1)
 {
     ad = ad1;
     InitializeComponent();
 }
 public Admin_Faculty(admin ad1)
 {
     ad = ad1;
     InitializeComponent();
 }
Exemplo n.º 6
0
 public Admin_Student(string nm, admin adm)
 {
     name = nm;
     ad   = adm;
     InitializeComponent();
 }
 private void Button6_Click(object sender, EventArgs e)
 {
     admin ad = new admin();
     ad.Show();
     this.Dispose();
     this.Close();
 }
Exemplo n.º 8
0
 public Admin_Faculty(admin ad1)
 {
     ad = ad1;
     InitializeComponent();
 }