Exemplo n.º 1
0
        private void btn_HRMEdit_Click(object sender, EventArgs e)
        {
            DataGridViewSelectedRowCollection r = dgv_HRM.SelectedRows;

            if (r.Count == 1)
            {
                if (bool.Parse(r[0].Cells["UserActiveflag"].Value.ToString()))
                {
                    Form_User_Profile f = new Form_User_Profile(int.Parse(r[0].Cells["IdUser"].Value.ToString()), "", true, false);
                    f.myDel = loadDtbUser;
                    this.Hide();
                    f.ShowDialog();
                    this.Show();
                }
                else
                {
                    MessageBox.Show("Can't update inactive user!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else if (r.Count == 0)
            {
                MessageBox.Show("Please choose one row to update!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                MessageBox.Show("Only one row can be chosen to update!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 private void btn_Profile_Click(object sender, EventArgs e)
 {
     Form_User_Profile f = new Form_User_Profile(QLUserBLL.stoUser.IdUser, LoggedRole, false, true);
     this.Hide();
     f.ShowDialog();
     this.Show();
 }
Exemplo n.º 3
0
        //--- fllaypn_HRMButtons ---//
        private void btn_HRMAdd_Click(object sender, EventArgs e)
        {
            Form_User_Profile f = new Form_User_Profile(0, "", true, false);

            f.myDel = loadDtbUser;
            this.Hide();
            f.ShowDialog();
            this.Show();
        }