Пример #1
0
        private void btnAddUser_Click(object sender, EventArgs e)
        {
            Form f = Application.OpenForms["frmAddUser"];

            if (f == null)
            {
                forAddUserVO.setFunctionFor = 1;
                frmAddUser fau = new frmAddUser();
                fau.Text      = "Add User";
                fau.MdiParent = MdiParent;
                fau.Show();
            }
            else
            {
                MessageBox.Show("Add User Form Is Already Opened!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (lvUserList.SelectedItems.Count != 0)
     {
         Form f = Application.OpenForms["frmAddUser"];
         if (f == null)
         {
             forAddUserVO.setFunctionFor = 2;
             frmAddUser fau = new frmAddUser();
             fau.Text      = "Edit User";
             fau.MdiParent = MdiParent;
             fau.Show();
         }
         else
         {
             MessageBox.Show("Add User Form Is Already Opened!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     else
     {
         MessageBox.Show("Please Select User To Edit!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }