Beispiel #1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            // open userfunctions form with ADD function
            UsersFunctionsForm adminuser1 = new UsersFunctionsForm();

            adminuser1.Text          = "ADD";
            adminuser1.FunctionUsers = UserUsers;
            adminuser1.ShowDialog();
            this.Close();
        }
Beispiel #2
0
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            //opens search function form
            UsersFunctionsForm adminsearching = new UsersFunctionsForm();

            trial = "select * from Users where ";
            adminsearching.FunctionUsers = UserUsers;
            adminsearching.Text          = "SEARCH";
            adminsearching.HideInstructions();
            adminsearching.ShowDialog();
            this.Close();
        }
Beispiel #3
0
 private void BtnEdit_Click(object sender, EventArgs e)
 {
     // checks if mtd fields are empty and opens edit user function form when fields are not empty.
     if (string.IsNullOrEmpty(mtdUser) || string.IsNullOrEmpty(mtdPass) || string.IsNullOrEmpty(mtdAdmin) || string.IsNullOrEmpty(mtdName))
     {
         MessageBox.Show("Select Row to be edited.");
     }
     else
     {
         UsersFunctionsForm admin1edit = new UsersFunctionsForm();
         admin1edit.Text          = "EDIT";
         admin1edit.FunctionUsers = UserUsers;
         admin1edit.SetFieldsToBeEdited(Id, mtdUser, mtdPass, mtdAdmin, mtdName);
         admin1edit.HideInstructions();
         admin1edit.ShowDialog();
         this.Close();
         Clear();
     }
 }