public partial class frmLaboratory {
ucDiabeticLab.ShowCurrentData += new ucDiabeticLab.ShowCurrentDataEvent(showBloodLabData);
private void showBloodLabData()
{
if (ucBloodTabs == null)
{
ucBloodTabs = new ucBloodLabs(str_PatientId, str_PatientSN);
this.pan_Left.Controls.Add(ucBloodTabs);
ucBloodTabs.Dock = DockStyle.Fill;
ucBloodTabs.ShowBloodData += new Control.ucBloodLabs.ShowBloodDataEvent(showBloodData);
}
this.ucDiabeticLab.Visible = false;
if (ucBloodTabs != null)
{
this.ucBloodTabs.Visible = true;
this.ucBloodTabs.BringToFront();
}
this.ucBloodTabs.PatientId = str_PatientId;
this.ucBloodTabs.VisitId = str_PatientSN;
this.ucBloodTabs.InitPage();
if (frm != null)
{
frm.Close();
frm = null;
}
}
private void showBloodData()
{
Application.DoEvents();
this.ucDiabeticLab.Visible = true;
if (ucBloodTabs != null)
{
this.ucBloodTabs.Visible = false;
}
}
}