Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            UserAuthenticate.LoginWebService a = new UserAuthenticate.LoginWebService();
            string type = a.loginService(txtUsername.Text.ToString(), txtPassword.Text.ToString());

            if (type == null)
            {
                MessageBox.Show("Username or Password is incorrect, enter again.", "Login Error");
            }
            else
            {
                type = type.ToLower();
                if (type == "student")
                {
                    user = txtUsername.Text;
                    Student_View_Information svi = new Student_View_Information(this);
                    svi.Show();
                    this.Hide();
                }
                else if (type == "teacher")
                {
                    user = txtUsername.Text;
                    Teachers t = new Teachers(this);
                    t.Show();
                    this.Hide();
                }
                else if (type == "admin")
                {
                    user = txtUsername.Text;
                    Admin ad = new Admin(this);
                    ad.Show();
                    this.Hide();
                }
            }
        }
 public Change_Password(Admin a, Teachers t, Student_View_Information svi)
 {
     this.a   = a;
     this.t   = t;
     this.svi = svi;
     if (a != null)
     {
         flag = 1;
     }
     else if (t != null)
     {
         flag = 2;
     }
     else if (svi != null)
     {
         flag = 3;
     }
     InitializeComponent();
 }
Example #3
0
        public Check_Attendence(Student_View_Information obj)
        {
            svi = obj;

            InitializeComponent();
        }
 public View_Marks(Student_View_Information s)
 {
     svi = s;
     InitializeComponent();
 }