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

            PSP_ForecastReports report = Itop.Common.DataConverter.RowToObject <PSP_ForecastReports>(gridView1.GetDataRow(gridView1.FocusedRowHandle));

            Form91Forecast frm = new Form91Forecast(report, typeFlag);

            frm.CanEdit     = base.EditRight;
            frm.CanPrint    = base.PrintRight;
            frm.IsSelect    = IsSelect;
            frm.ADdRight    = AddRight;
            frm.DEleteRight = DeleteRight;
            try
            {
                frm.StartYear = (int)gridView1.GetDataRow(gridView1.FocusedRowHandle)["StartYear"];
            }
            catch { }
            DialogResult dr = frm.ShowDialog();

            if (IsSelect && dr == DialogResult.OK)
            {
                Title        = report.Title;
                Unit         = "单位:万千瓦时";
                Gcontrol     = frm.GridControl;
                DialogResult = DialogResult.OK;
            }
        }
Esempio n. 2
0
        private void ShowDetails()
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

            PSP_ForecastReports report = Itop.Common.DataConverter.RowToObject<PSP_ForecastReports>(gridView1.GetDataRow(gridView1.FocusedRowHandle));

            Form91Forecast frm = new Form91Forecast(report, typeFlag);
            frm.CanEdit = base.EditRight;
            frm.CanPrint = base.PrintRight;
            frm.IsSelect = IsSelect;
            frm.ADdRight = AddRight;
            frm.DEleteRight = DeleteRight;
            try
            {
                frm.StartYear = (int)gridView1.GetDataRow(gridView1.FocusedRowHandle)["StartYear"];
            }
            catch { }
            DialogResult dr = frm.ShowDialog();

            if (IsSelect && dr == DialogResult.OK)
            {
                Title = report.Title;
                Unit = "单位:万千瓦时";
                Gcontrol = frm.GridControl;
                DialogResult = DialogResult.OK;
            }
        }