예제 #1
0
 public virtual void ShowReport(ReportViewerData rd)
 {
     try
     {
         Form_ReportViewer f = new Form_ReportViewer(rd);
         f.Show(this);
     }
     catch (Exception e)
     {
         MyException me = new MyException("Neizdevās atvērt atskaiti", e);
         Form_Error.ShowException(MyMainForm, me);
     }
 }
예제 #2
0
        public static void ShowException(Form owner, Exception e)
        {
            if (e == null)
            {
                return;
            }
            Form_Error fe = new Form_Error();

            fe.tbMsg.Text   = e.Message;
            fe.tbDescr.Text = e.ToString();
            try
            {
                fe.ShowDialog(owner);
            }
            catch (Exception) { }
        }
예제 #3
0
        private void Form2_Load(object sender, EventArgs e)
        {
            int zoom = MyData.Settings.ReportZoom;

            if (zoom < 10 || zoom > 500)
            {
                zoom = 100;
            }
            try
            {
                reportViewer1.ZoomPercent = zoom;
                reportViewer1.RefreshReport();
            }
            catch (Exception ex)
            {
                this.Close();
                Form_Error.ShowException(MyMainForm, new MyException("Neizdevās atvērt atskaiti", ex));
            }
        }