Esempio n. 1
0
        private void btnAdduser_Click(object sender, EventArgs e)
        {
            frmAddUser _frmAddUser = new frmAddUser();

            _frmAddUser.ShowDialog();
            loadData();
        }
        private void btnAddUser_Click(object sender, EventArgs e)
        {
            frmAddUser add = new frmAddUser();

            add.ShowDialog();
            HienThiDuLieu();
        }
Esempio n. 3
0
        private void addUserToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HelperMethods.CloseAllForms();
            frmAddUser frm = new frmAddUser();

            frm.MdiParent   = Application.OpenForms["frmIndex"];
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }
Esempio n. 4
0
        /*
         * Add user
         */
        private void bttnAddUser_Click(object sender, EventArgs e)
        {
            frmAddUser FAU = new frmAddUser(null);

            FAU.ShowDialog();
            if (FAU.DialogResult == DialogResult.OK)
            {
                bttnRefresh_Click(sender, e);
            }
        }
Esempio n. 5
0
 private void CreateUserToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (_frmAddUser == null)
     {
         _frmAddUser = new frmAddUser();
         _frmAddUser.Show(dp, DockState.Document);
     }
     else
     {
         _frmAddUser.Activate();
     }
 }
Esempio n. 6
0
        private void pbAddUser_Click(object sender, EventArgs e)
        {
            panel1.Location = new Point(
                this.ClientSize.Width / 2 - panel1.Size.Width / 2,
                this.ClientSize.Height / 2 - panel1.Size.Height / 2);
            panel1.Anchor = AnchorStyles.Top;

            panel1.Controls.Clear();
            frmAddUser f2 = new frmAddUser();

            f2.TopLevel = false;
            panel1.Controls.Add(f2);
            panel1.AutoSize    = true;
            f2.panel1.AutoSize = true;
            f2.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            f2.Dock            = DockStyle.Fill;

            f2.Show();
        }
Esempio n. 7
0
        private void btnAddUser_Click(object sender, EventArgs e)
        {
            panel1.Visible       = true;
            btnAddUser.Visible   = false;
            searchButton.Visible = false;
            label1.Visible       = false;
            label2.Visible       = false;
            btnRefreshDG.Visible = false;
            pictureBox1.Visible  = false;
            pictureBox2.Visible  = false;

            panel1.Controls.Clear();
            frmAddUser f2 = new frmAddUser();

            f2.TopLevel = false;
            panel1.Controls.Add(f2);
            f2.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            f2.Dock            = DockStyle.Fill;
            f2.Show();
        }
Esempio n. 8
0
 /*
  * Change data user
  */
 private void bttnChngUser_Click(object sender, EventArgs e)
 {
     try {
         if (AdmUsr == "User")
         {
             frmAddUser FAU = new frmAddUser(dataTableUsers.SelectedRows[0].Cells[0].Value.ToString());
             FAU.tbLogin.Text       = dataTableUsers.SelectedRows[0].Cells[1].Value.ToString();
             FAU.tbFN.Text          = dataTableUsers.SelectedRows[0].Cells[2].Value.ToString();
             FAU.chckBoxAdm.Visible = false;
             FAU.bttnOK.Text        = "Изменить";
             FAU.labelPanelAdm.Text = "Изменить данные пользователя";
             FAU.labelPanelAdm.Left = (ClientSize.Width - FAU.labelPanelAdm.Width) / 2;
             FAU.ShowDialog();
             if (FAU.DialogResult == DialogResult.OK)
             {
                 bttnRefresh_Click(sender, e);
             }
         }
         else if (AdmUsr == "Admin")
         {
             frmAddUser FAU = new frmAddUser(dataTableAdm.SelectedRows[0].Cells[0].Value.ToString());
             FAU.tbLogin.Text       = dataTableAdm.SelectedRows[0].Cells[1].Value.ToString();
             FAU.tbFN.Text          = dataTableAdm.SelectedRows[0].Cells[2].Value.ToString();
             FAU.bttnOK.Text        = "Изменить";
             FAU.labelPanelAdm.Text = "Изменить данные пользователя";
             FAU.labelPanelAdm.Left = (ClientSize.Width - FAU.labelPanelAdm.Width) / 2;
             FAU.ShowDialog();
             if (FAU.DialogResult == DialogResult.OK)
             {
                 bttnRefresh_Click(sender, e);
             }
         }
     }
     catch {
         ErrorChangeData errorCD = new ErrorChangeData();
         errorCD.Show();
     }
 }
Esempio n. 9
0
 private void addUserToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Tables.tblUser.frmAddUser frmAddUser = new frmAddUser(this);
     frmAddUser.Show();
     this.Enabled = false;
 }
Esempio n. 10
0
        private void btnAddUser_Click(object sender, EventArgs e)
        {
            frmAddUser addUser = new frmAddUser();

            addUser.Show();
        }