Esempio n. 1
0
        private void EditReport()
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

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


            PSP_WGBCReports report = Itop.Common.DataConverter.RowToObject <PSP_WGBCReports>(gridView1.GetDataRow(gridView1.FocusedRowHandle));
            FormWGBC        frm    = new FormWGBC();

            frm.IsEdit     = true;
            frm.WgbcReport = report;
            frm.Text       = "修改无功补偿容量配置表";

            if (frm.ShowDialog() == DialogResult.OK)
            {
                Itop.Common.DataConverter.ObjectToRow(frm.WgbcReport, gridView1.GetDataRow(gridView1.FocusedRowHandle));
            }
        }
Esempio n. 2
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!base.AddRight)
            {
                MsgBox.Show("您没有权限进行此项操作!");
                return;
            }

            FormWGBC frm = new FormWGBC();
            frm.IsEdit = false;
            frm.Text = "添加无功补偿容量配置表";

            if (frm.ShowDialog() == DialogResult.OK)
            {
                DataRow newRow = dataTable.NewRow();
                Itop.Common.DataConverter.ObjectToRow(frm.WgbcReport, newRow);
                dataTable.Rows.Add(newRow);

                gridView1.FocusedRowHandle = gridView1.RowCount - 1;
            }
        }
Esempio n. 3
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!base.AddRight)
            {
                MsgBox.Show("您没有权限进行此项操作!");
                return;
            }

            FormWGBC frm = new FormWGBC();

            frm.IsEdit = false;
            frm.Text   = "添加无功补偿容量配置表";

            if (frm.ShowDialog() == DialogResult.OK)
            {
                DataRow newRow = dataTable.NewRow();
                Itop.Common.DataConverter.ObjectToRow(frm.WgbcReport, newRow);
                dataTable.Rows.Add(newRow);

                gridView1.FocusedRowHandle = gridView1.RowCount - 1;
            }
        }
Esempio n. 4
0
        private void EditReport()
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

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

            PSP_WGBCReports report = Itop.Common.DataConverter.RowToObject<PSP_WGBCReports>(gridView1.GetDataRow(gridView1.FocusedRowHandle));
            FormWGBC frm = new FormWGBC();
            frm.IsEdit = true;
            frm.WgbcReport = report;
            frm.Text = "修改无功补偿容量配置表";

            if (frm.ShowDialog() == DialogResult.OK)
            {
                Itop.Common.DataConverter.ObjectToRow(frm.WgbcReport, gridView1.GetDataRow(gridView1.FocusedRowHandle));
            }
        }