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

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

            try
            {
                FrmXiaoshi frm = new FrmXiaoshi(report, typeFlag);
                frm.CanPrint    = base.PrintRight;
                frm.CanEdit     = base.EditRight;
                frm.PRintRight  = PrintRight;
                frm.EDitRight   = EditRight;
                frm.ADdRight    = AddRight;
                frm.DEleteRight = DeleteRight;

                //frm.IsSelect = IsSelect;
                DialogResult dr = frm.ShowDialog();

                if (IsSelect && dr == DialogResult.OK)
                {
                    //Title = report.Title;
                    //Unit = "单位:万千瓦时";
                    //Gcontrol = frm.GridControl;
                    DialogResult = DialogResult.OK;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
        private void ShowDetails()
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

            PSP_ForecastReports report = Itop.Common.DataConverter.RowToObject<PSP_ForecastReports>(gridView1.GetDataRow(gridView1.FocusedRowHandle));
            try
            {
                FrmXiaoshi frm = new FrmXiaoshi(report, typeFlag);
                frm.CanPrint = base.PrintRight;
                frm.CanEdit = base.EditRight;
                frm.PRintRight = PrintRight;
                frm.EDitRight = EditRight;
                frm.ADdRight=AddRight;
                frm.DEleteRight=DeleteRight;

                //frm.IsSelect = IsSelect;
                DialogResult dr = frm.ShowDialog();

                if (IsSelect && dr == DialogResult.OK)
                {
                    //Title = report.Title;
                    //Unit = "单位:万千瓦时";
                    //Gcontrol = frm.GridControl;
                    DialogResult = DialogResult.OK;
                }
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }