Ejemplo n.º 1
0
        private void btnchk_Click(object sender, EventArgs e)
        {
            try
            {
                if (!clsUserRight.chkRight(sUserID, 3550))
                {
                    throw new Exception("没有权限");
                }

                string sCode = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridColcCode).ToString().Trim();
                if (sCode == "")
                {
                    throw new Exception("请选择单据");
                }

                Maintenance_Edit frm = new Maintenance_Edit(Conn, sCode);
                frm.sUserName     = this.sUserName;
                frm.sUserID       = this.sUserID;
                frm.StartPosition = FormStartPosition.CenterParent;
                frm.ShowDialog();

                if (frm.DialogResult == DialogResult.OK)
                {
                    GetGrid();
                }
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message);
            }
        }
Ejemplo n.º 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                if (!clsUserRight.chkRight(sUserID, 3520))
                {
                    throw new Exception("没有权限");
                }


                Maintenance_Edit frm = new Maintenance_Edit(Conn, "");
                frm.StartPosition = FormStartPosition.CenterParent;
                frm.sUserName     = this.sUserName;
                frm.sUserID       = this.sUserID;
                frm.ShowDialog();

                if (frm.DialogResult == DialogResult.OK)
                {
                    GetGrid();
                }
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message);
            }
        }