Пример #1
0
 private void btn_Add_Click(object sender, EventArgs e)
 {
     var dlgUserInfo = new DlgUserInfo(null, "Add");
     if(dlgUserInfo.ShowDialog()==DialogResult.OK)
     {
         InitUserGrid();
     }
 }
Пример #2
0
        private void btn_Add_Click(object sender, EventArgs e)
        {
            var dlgUserInfo = new DlgUserInfo(null, "Add");

            if (dlgUserInfo.ShowDialog() == DialogResult.OK)
            {
                InitUserGrid();
            }
        }
Пример #3
0
        private void btn_Edit_Click(object sender, EventArgs e)
        {
            if(gv_User.FocusedRowHandle<0)
            {
                XtraMessageBox.Show("请选择需要编辑的用户!", "提示");
                return;
            }
            var userId = Convert.ToInt32(gv_User.GetFocusedRowCellValue("Id"));
            var user = _users.First(u => u.Id == userId);

            var dlgUserInfo = new DlgUserInfo(user, "Edit");
            if (dlgUserInfo.ShowDialog() == DialogResult.OK)
            {
                InitUserGrid();
            }
        }
Пример #4
0
        private void btn_Edit_Click(object sender, EventArgs e)
        {
            if (gv_User.FocusedRowHandle < 0)
            {
                XtraMessageBox.Show("请选择需要编辑的用户!", "提示");
                return;
            }
            var userId = Convert.ToInt32(gv_User.GetFocusedRowCellValue("Id"));
            var user   = _users.First(u => u.Id == userId);

            var dlgUserInfo = new DlgUserInfo(user, "Edit");

            if (dlgUserInfo.ShowDialog() == DialogResult.OK)
            {
                InitUserGrid();
            }
        }