Пример #1
0
        private void btnAddUser_Click(object sender, EventArgs e)
        {
            frmUserDetail fu = new frmUserDetail(null);

            fu.ShowDialog();

            if (fu.Tag != null)
            {
                LoadData();
            }
        }
Пример #2
0
 private void btnUser_Click(object sender, EventArgs e)
 {
     if (cLoginUser.Role == "worker")
     {
         frmUserDetail frm = new frmUserDetail(cLoginUser);
         frm.ShowDialog();
     }
     else
     {
         frmCreateUser f = new frmCreateUser();
         f.ShowDialog();
     }
 }
Пример #3
0
        private void repoEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }
            clsUser curr = (clsUser)gridView1.GetFocusedRow();

            if (curr.ID != 0)
            {
                frmUserDetail fu = new frmUserDetail(curr);
                fu.ShowDialog();

                if (fu.Tag != null)
                {
                    LoadData();
                }
            }
        }