Exemplo n.º 1
0
        //修改
        private void barButtonItem8_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

            if (!base.EditRight)
            {
                MessageBox.Show("您没有权限进行此项操作!");
                return;
            }
            FrmTableReportEdit frm = new FrmTableReportEdit();

            frm.ptr  = (Ps_Table_Report)gridView1.GetRow(gridView1.FocusedRowHandle);
            frm.Text = "修改报表管理信息";
            frm.ShowDialog();
            if (frm.DialogResult == DialogResult.OK)
            {
                try
                {
                    Common.Services.BaseService.Update <Ps_Table_Report>(frm.ptr);
                    InitData();
                }
                catch (Exception)
                {
                    throw;
                }
            }
        }
Exemplo n.º 2
0
        //添加
        private void barButtonItem7_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!base.AddRight)
            {
                MessageBox.Show("您没有权限进行此项操作!");
                return;
            }
            FrmTableReportEdit frm    = new FrmTableReportEdit();
            Ps_Table_Report    newptr = new Ps_Table_Report();

            newptr.ProjectID = MIS.ProgUID;
            newptr.Num1      = Convert.ToInt32(Common.Services.BaseService.GetObject("SelectPs_Table_ReportMaxNum1", " ProjectID='" + MIS.ProgUID + "'")) + 1;
            frm.ptr          = newptr;
            frm.Text         = "添加报表管理信息";
            frm.ShowDialog();
            if (frm.DialogResult == DialogResult.OK)
            {
                try
                {
                    Common.Services.BaseService.Create <Ps_Table_Report>(frm.ptr);
                    InitData();
                }
                catch (Exception)
                {
                    throw;
                }
            }
        }
Exemplo n.º 3
0
        //�޸�
        private void barButtonItem8_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

            if (!base.EditRight)
            {
                MessageBox.Show("��û��Ȩ�޽��д��������");
                return;
            }
            FrmTableReportEdit frm = new FrmTableReportEdit();
            frm.ptr = (Ps_Table_Report)gridView1.GetRow(gridView1.FocusedRowHandle);
            frm.Text = "�޸ı��������Ϣ";
            frm.ShowDialog();
            if (frm.DialogResult == DialogResult.OK)
            {
                try
                {
                    Common.Services.BaseService.Update<Ps_Table_Report>(frm.ptr);
                    InitData();
                }
                catch (Exception)
                {

                    throw;
                }

            }
        }
Exemplo n.º 4
0
        //���
        private void barButtonItem7_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!base.AddRight)
            {
                MessageBox.Show("��û��Ȩ�޽��д��������");
                return;
            }
            FrmTableReportEdit frm = new FrmTableReportEdit();
            Ps_Table_Report newptr = new Ps_Table_Report();
            newptr.ProjectID = MIS.ProgUID;
            newptr.Num1 =Convert.ToInt32( Common.Services.BaseService.GetObject("SelectPs_Table_ReportMaxNum1", " ProjectID='" + MIS.ProgUID + "'") )+ 1;
            frm.ptr = newptr;
            frm.Text = "��ӱ��������Ϣ";
            frm.ShowDialog();
            if (frm.DialogResult==DialogResult.OK)
            {
                try
                {
                    Common.Services.BaseService.Create<Ps_Table_Report>(frm.ptr);
                    InitData();
                }
                catch (Exception)
                {

                    throw;
                }

            }
        }