Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            user1.username = unsu.Text.ToString();
            user1.password = passsu.Text.ToString();
            user1.groupid  = (int)gisu.SelectedItem;
            if (psu.Enabled == true)
            {
                user1.privilege = Int32.Parse(psu.Text);
            }
            fun.setuser(user1);
            user1 = fun.getuser(user1.username, user1.password);
            this.Hide();
            devices f2 = new devices(user1);

            f2.ShowDialog();//to next form
        }
Пример #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (unln.Text.ToString() == "" || passln.Text.ToString() == "")
     {
         MessageBox.Show("Enter Username and Password");
     }
     else
     {
         user1 = fun.getuser(unln.Text.ToString(), passln.Text.ToString());
         if (user1 == null)
         {
             unln.Clear(); passln.Clear();
         }
         else
         {
             this.Hide();
             devices f2 = new devices(user1);
             f2.ShowDialog();//to next formt
         }
     }
 }