67 lines
1.5 KiB
C#
67 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using System.Reflection;
|
|
using System.Resources;
|
|
using System.Drawing.Imaging;
|
|
using System.Collections;
|
|
using System.Diagnostics;
|
|
using System.Runtime.Remoting;
|
|
namespace AIMS.OremrUserControl
|
|
{
|
|
public partial class ucReport : UserControl
|
|
{
|
|
public string Path { get; set; }
|
|
public string ReportName { get; set; }
|
|
public ucReport()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void ucReport_Load(object sender, EventArgs e)
|
|
{
|
|
lbName.Text = ReportName;
|
|
}
|
|
|
|
private void ucReport_Click(object sender, EventArgs e)
|
|
{
|
|
OpenReport();
|
|
}
|
|
|
|
private void picDocToPrint_Click(object sender, EventArgs e)
|
|
{
|
|
OpenReport();
|
|
}
|
|
|
|
private void lbName_Click(object sender, EventArgs e)
|
|
{
|
|
OpenReport();
|
|
}
|
|
|
|
private void OpenReport()
|
|
{
|
|
if (Path != "")
|
|
{
|
|
Form frm = GetForm(Path);
|
|
frm.ShowDialog();
|
|
}
|
|
}
|
|
|
|
public Form GetForm(string Path)
|
|
{
|
|
object result = null;
|
|
Type type = Type.GetType(Path);
|
|
result = (Form)Activator.CreateInstance(type);
|
|
return (Form)result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|