public void ShowB() { object o; Login frm = new Login() { AssemblyName = "HPA.Component.MainFrame", ClassName = "Login" }; m_objManager.OpenObject(frm, true, null, out o); if (frm.DialogResult != DialogResult.OK) { this.Dispose(); this.Close(); return; } else { CheckIdleTimer.Start(); } m_objManager.UserID = frm.UserID; m_objManager.UserName = frm.UserName; //Set status txtToolUserName.Text = frm.UserName.ToString(); txtToolServerInfo.Text = m_objManager.DBEngine.Server; txtDatabaseName.Text = m_objManager.DBEngine.Database; //Load main buttons LoadMenu(); //... //Load menu strip //LoadMenuStrip(); }
private void tilLock_ItemClick(object sender, TileItemEventArgs e) { object o; //m_objManager.OpenObject("HPA.TimeAttendance", "MachineManagement", false, UIMessage.Get_Message("MnuTAD117"), out o); Login frm = new Login() { AssemblyName = "HPA.Component.MainFrame", ClassName = "Login" }; m_objManager.OpenObject(frm, true, null, out o); if (frm.DialogResult != DialogResult.OK) { this.Dispose(); this.Close(); return; } else { CheckIdleTimer.Start(); } m_objManager.UserID = frm.UserID; m_objManager.UserName = frm.UserName; //Load main buttons LoadMenu(); }
private void MnuLock_Click(object sender, EventArgs e) { object o; //m_objManager.OpenObject("HPA.TimeAttendance", "MachineManagement", false, UIMessage.Get_Message("MnuTAD117"), out o); Login frm = new Login() { AssemblyName = "HPA.Component.MainFrame", ClassName = "Login" }; m_objManager.OpenObject(frm, true, null, out o); if (frm.DialogResult != DialogResult.OK) { this.Dispose(); this.Close(); return; } else { CheckIdleTimer.Start(); } m_objManager.UserID = frm.UserID; m_objManager.UserName = frm.UserName; //Set status txtToolUserName.Text = frm.UserName.ToString(); txtToolServerInfo.Text = m_objManager.DBEngine.Server; txtDatabaseName.Text = m_objManager.DBEngine.Database; //Load main buttons LoadMenu(); }