private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!base.AddRight)
            {
                MsgBox.Show("您没有权限进行此项操作!");
                return;
            }

            FormForecastReport_VolumeBalance frm = new FormForecastReport_VolumeBalance();

            frm.IsEdit   = false;
            frm.TypeFlag = typeFlag;
            frm.Text     = "添加分区名称";
            //  frm.TypeText = "负荷";

            if (frm.ShowDialog() == DialogResult.OK)
            {
                DataRow newRow = dataTable.NewRow();
                Itop.Common.DataConverter.ObjectToRow(frm.Psp_ForecastReport, newRow);
                dataTable.Rows.Add(newRow);
                gridView1.FocusedRowHandle = gridView1.RowCount - 1;
            }
        }
        private void EditReport()
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

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

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

            frm.IsEdit             = true;
            frm.Psp_ForecastReport = report;
            frm.Text = "修改分区";
            if (frm.ShowDialog() == DialogResult.OK)
            {
                Itop.Common.DataConverter.ObjectToRow(frm.Psp_ForecastReport, gridView1.GetDataRow(gridView1.FocusedRowHandle));
            }
        }
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!base.AddRight)
            {
                MsgBox.Show("您没有权限进行此项操作!");
                return;
            }

            FormForecastReport_VolumeBalance frm = new FormForecastReport_VolumeBalance();
            frm.IsEdit = false;
            frm.TypeFlag = typeFlag;
            frm.Text = "添加分区名称";
              //  frm.TypeText = "负荷";

            if (frm.ShowDialog() == DialogResult.OK)
            {
                DataRow newRow = dataTable.NewRow();
                Itop.Common.DataConverter.ObjectToRow(frm.Psp_ForecastReport, newRow);
                dataTable.Rows.Add(newRow);
                gridView1.FocusedRowHandle = gridView1.RowCount - 1;
            }
        }
        private void EditReport()
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

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

            PowerEachList report = Itop.Common.DataConverter.RowToObject<PowerEachList>(gridView1.GetDataRow(gridView1.FocusedRowHandle));
            FormForecastReport_VolumeBalance frm = new FormForecastReport_VolumeBalance();
            frm.IsEdit = true;
            frm.Psp_ForecastReport = report;
            frm.Text = "修改分区";
            if (frm.ShowDialog() == DialogResult.OK)
            {
                Itop.Common.DataConverter.ObjectToRow(frm.Psp_ForecastReport, gridView1.GetDataRow(gridView1.FocusedRowHandle));
            }
        }