private void btnreport_Click(object sender, EventArgs e) { if (CComLibrary.GlobeVal.filesave == null) { MessageBox.Show("请先读取试验方法"); return; } if (GlobeVal.myglobefile.safe == true) { if (GlobeVal.myglobefile.AppUserLevel < 1) { MessageBox.Show("您的当前权限不够,请使用试验经理或管理员权限登录"); return; } } TabControl b = ((TabControl)Application.OpenForms["FormMainLab"].Controls["tabcontrol1"]); UserControlMain c = GlobeVal.FormmainLab.umain; c.OpenReport(); b.SelectedIndex = 1; }
private void btnreport_Click(object sender, EventArgs e) { if (CComLibrary.GlobeVal.filesave == null) { if (GlobeVal.mysys.language == 0) { MessageBox.Show("请先读取试验方法"); } else { MessageBox.Show("Please read the test method first."); } return; } if (GlobeVal.mysys.safe == true) { if (GlobeVal.mysys.AppUserLevel < 1) { if (GlobeVal.mysys.language == 0) { MessageBox.Show("您的当前权限不够,请使用试验经理或管理员权限登录"); } else { MessageBox.Show("Insufficient permissio to login system."); } return; } } TabControl b = ((TabControl)Application.OpenForms["FormMainLab"].Controls["tabcontrol1"]); UserControlMain c = GlobeVal.FormmainLab.umain; ((SplitContainer)b.TabPages[1].Controls[0]).Panel2Collapsed = true; c.OpenReport(); b.SelectedIndex = 1; }