Exemplo n.º 1
0
        /// <summary>
        /// 新增
        /// </summary>
        protected override void SetInsertInit(bool isClear)
        {
            base.SetInsertInit(isClear);
            try
            {
                frmLicense_RecAdd frm = new frmLicense_RecAdd();
                frm.ScanMode = Common.DataModifyMode.add;

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    this.ScanMode = Common.DataModifyMode.dsp;
                    GetDspDataList();
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                XtraMsgBox.Show("新增数据失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, ex, this.GetType());
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 人员对象双击事件,查看人员免许详细
        /// </summary>
        void m_Person_DoubleClick(object sender, EventArgs e)
        {
            //this.TopMost = false;
            UserPerson col = sender as UserPerson;
            frmLicense_RecAdd frm = new frmLicense_RecAdd();
            frm.TopMost = true;
            frm.ScanMode = Common.DataModifyMode.upd;
            string str = string.Format(@" select * from V_License_Rec_i where UserID='{0}'", col.UserID);
            DataTable dt = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str);
            if (dt.Rows.Count > 0)
            {
                frm.dr = dt.Rows[0];
                frm.m_isPad = "true";
                frm.ShowDialog();

            }
            else
            {
                FrmAttendDialog FrmDialog = new FrmAttendDialog("当前人员无免许信息!");
                FrmDialog.ShowDialog();
            }
            this.TopMost = true;
        }
Exemplo n.º 3
0
        /// <summary>
        /// 修改
        /// </summary>
        public override void SetModifyInit()
        {
            base.SetModifyInit();
            try
            {
                if (this.GetSelectList().Length <= 0)
                {
                    XtraMsgBox.Show("未勾选任何数据!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                else if (this.GetSelectList().Length > 1)
                {
                    XtraMsgBox.Show("修改时,只能勾选一条数据!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                frmLicense_RecAdd frm = new frmLicense_RecAdd();
                frm.ScanMode = Common.DataModifyMode.upd;
                //选择所有选择的数据
                frm.dr = this.GetSelectList()[0];

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    this.ScanMode = Common.DataModifyMode.dsp;
                    GetDspDataList();
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                XtraMsgBox.Show("修改数据失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, ex, this.GetType());
            }
        }