Example #1
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="isClear"></param>
        protected override void SetInsertInit(bool isClear)
        {
            base.SetInsertInit(isClear);
            try
            {
                frmEditOper_Info frm = new frmEditOper_Info();
                frm.ScanMode = Common.DataModifyMode.add;
                if (frm.ShowDialog() == DialogResult.OK) 
                {
                    
                }

            }
            catch (Exception ex)
            {
                XtraMsgBox.Show("新增失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, ex, this.GetType());
            }
        }
Example #2
0
        /// <summary>
        /// 修改
        /// </summary>
        public override void SetModifyInit()
        {
            base.SetModifyInit();
            try
            {
                frmEditOper_Info frm = new frmEditOper_Info();
                frm.ScanMode = Common.DataModifyMode.upd;
                DataRow row=gridView1.GetFocusedDataRow();

                if (row["user_status"].ToString() == "离职")
                {
                    XtraMsgBox.Show("该用户已离职不可操作!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                frm.dr = row;
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    SetSearchProc(this);
                }
            }
            catch (Exception ex)
            {
                XtraMsgBox.Show("新增失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, ex, this.GetType());
            }
        }