Example #1
0
File: UCUser.cs Project: hjqcan/LDL
        //修改
        void _barbtnUpdate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            if (gvData.FocusedRowHandle < 0)
            {
                ControlsHelper.ShowWarningMessage("提醒", "请点击修改的用户");
            }
            else
            {
                SysUser user = (SysUser)gvData.GetRow(gvData.FocusedRowHandle);

                FrmUserEdit frmUser = new FrmUserEdit(DBOperateType.Update, user);
                if (frmUser.ShowDialog() == DialogResult.OK)
                {
                    BindList();
                    ControlsHelper.ShowAlertMessage(this.ParentForm, "修改", "修改成功");
                }
            }
            this.Cursor = Cursors.Default;
        }
Example #2
0
File: UCUser.cs Project: hjqcan/LDL
 //新增
 void _barbtnInsert_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     FrmUserEdit frmUser = new FrmUserEdit(DBOperateType.Insert, null);
     if (frmUser.ShowDialog() == DialogResult.OK)
     {
         BindList();
         ControlsHelper.ShowAlertMessage(this.ParentForm, "新增", "新增成功");
     }
     this.Cursor = Cursors.Default;
 }