Exemplo n.º 1
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();
        }
Exemplo n.º 2
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();
     }
 }