Пример #1
0
        private void LogOffButton_Click(object sender, EventArgs e)
        {
            CLogin oLogin = new CLogin();
            CUserInfo oUserInfo = new CUserInfo();
            oUserInfo.UserID = m_oCommonConstants.UserInfo.UserID;
            CCommonConstants oConstant = ConfigManager.GetConfig<CCommonConstants>();

            oLogin = (RmsRemote.CLogin)Activator.GetObject(typeof(RmsRemote.CLogin), oConstant.RemoteURL);

            CResult oResult = oLogin.ProcessLogout(oUserInfo);

            if (oResult.IsSuccess )//&& oResult.Data != null)
            {
                this.Close();
                m_oCommonConstants.UserInfo = null;
                CLoginForm tempLogin = (CLoginForm)CFormManager.Forms.Pop();
                tempLogin.Show();
            }
        }
Пример #2
0
        private void btnRMSExit_Click(object sender, EventArgs e)
        {
            DialogResult tempDialogResult = MessageBox.Show("Are you sure you want to exit?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (tempDialogResult.Equals(DialogResult.No)) return;

            CCommonConstants m_oCommonConstants = ConfigManager.GetConfig<CCommonConstants>();
            CLogin oLogin = new CLogin();
            CUserInfo oUserInfo = new CUserInfo();
            oUserInfo.UserID = m_oCommonConstants.UserInfo.UserID;
            CCommonConstants oConstant = ConfigManager.GetConfig<CCommonConstants>();

            oLogin = (RmsRemote.CLogin)Activator.GetObject(typeof(RmsRemote.CLogin), oConstant.RemoteURL);

            CResult oResult = oLogin.ProcessLogout(oUserInfo);

            if (oResult.IsSuccess)
            {
                Application.Exit();
            }
            else
            {
            }
        }