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

            FormForecastReport_BigUser frm = new FormForecastReport_BigUser();
            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;
                PSP_BigUser_Types psp_Type = new PSP_BigUser_Types();
                psp_Type.S2 = "S2 LIKE '%" + (Convert.ToInt32(frm.Psp_ForecastReport.ListName) - 1)+ "%' and ItemID="+ItemID;
                IList listTypes = Common.Services.BaseService.GetList("SelectPSP_BigUser_TypesByItemID", psp_Type);
                foreach (PSP_BigUser_Types psp_Typetemp in listTypes)
                {
                    psp_Type = psp_Typetemp;
                    if (psp_Type.S2 != "" && !psp_Type.S2.Contains(frm.Psp_ForecastReport.ListName))
                    {
                        psp_Type.S2 += "," + frm.Psp_ForecastReport.ListName;
                    }
                    Common.Services.BaseService.Update<PSP_BigUser_Types>(psp_Type);
                }
            }
        }
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!base.AddRight)
            {
                MsgBox.Show("您没有权限进行此项操作!");
                return;
            }

            FormForecastReport_BigUser frm = new FormForecastReport_BigUser();

            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;
                PSP_BigUser_Types psp_Type = new PSP_BigUser_Types();
                psp_Type.S2 = "S2 LIKE '%" + (Convert.ToInt32(frm.Psp_ForecastReport.ListName) - 1) + "%' and ItemID=" + ItemID;
                IList listTypes = Common.Services.BaseService.GetList("SelectPSP_BigUser_TypesByItemID", psp_Type);
                foreach (PSP_BigUser_Types psp_Typetemp in listTypes)
                {
                    psp_Type = psp_Typetemp;
                    if (psp_Type.S2 != "" && !psp_Type.S2.Contains(frm.Psp_ForecastReport.ListName))
                    {
                        psp_Type.S2 += "," + frm.Psp_ForecastReport.ListName;
                    }
                    Common.Services.BaseService.Update <PSP_BigUser_Types>(psp_Type);
                }
            }
        }
        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_BigUser frm = new FormForecastReport_BigUser();

            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 EditReport()
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

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

            PowerEachList report = Itop.Common.DataConverter.RowToObject<PowerEachList>(gridView1.GetDataRow(gridView1.FocusedRowHandle));
            FormForecastReport_BigUser frm = new FormForecastReport_BigUser();
            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));
            }
        }