예제 #1
0
        private void EditReport()
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

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

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

            frm.IsEdit             = true;
            frm.Psp_ForecastReport = report;
            frm.ProjectUID         = ProjectUID;
            frm.Text = "修改预测";

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

            FormForecastEditC frm = new FormForecastEditC();

            frm.TypeFlag   = 2;
            frm.IsEdit     = false;
            frm.ProjectUID = ProjectUID;
            //       frm.TypeFlag = typeFlag;
            frm.Text = "添加新预测";

            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;
            }
        }
예제 #3
0
        private void EditReport()
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

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

            Ps_forecast_list report = Itop.Common.DataConverter.RowToObject<Ps_forecast_list>(gridView1.GetDataRow(gridView1.FocusedRowHandle));
            FormForecastEditC frm = new FormForecastEditC();
            frm.IsEdit = true;
            frm.Psp_ForecastReport = report;
            frm.ProjectUID = ProjectUID;
            frm.Text = "修改预测";

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

            FormForecastEditC frm = new FormForecastEditC();
            frm.TypeFlag = 2;
            frm.IsEdit = false;
            frm.ProjectUID = ProjectUID;
             //       frm.TypeFlag = typeFlag;
            frm.Text = "添加新预测";

            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;
            }
        }