/// <summary>
        /// Handles the Click event of the About control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void Scheduler_Click(object sender, EventArgs e)
        {
            WindowsIdentity  identity  = WindowsIdentity.GetCurrent();
            WindowsPrincipal principal = new WindowsPrincipal(identity);
            bool             isAdmin   = principal.IsInRole(WindowsBuiltInRole.Administrator);

            if (!isAdmin)
            {
                MessageBox.Show("Please run as administrator.", "HRDsq Plugin", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (accountStatus.Equals("new"))
            {
                NewUser objnew = new NewUser();
                objnew.ShowDialog();
            }
            else if (accountStatus.Equals("pending"))
            {
                MessageBox.Show("Your Registration is pending Approval! If you have any queries you can contact us at [email protected] / phone: +1-949-542-6773.", "patientXpress", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (accountStatus.Equals("expired"))
            {
                MessageBox.Show("Your Subscription at patientXpress has either expired or is outside the active period. Please contact us at [email protected] / phone: +1-949-542-6773..", "patientXpress", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (accountStatus.Equals("disable"))
            {
                MessageBox.Show("Your Account has been disabled. Please contact [email protected] / phone: +1-949-542-6773.", "patientXpress", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
            }
            else
            {
                Frm_settings objfrm = new Frm_settings();
                objfrm.ShowDialog();
            }
        }
Esempio n. 2
0
 private void btnScheduler_Click(object sender, EventArgs e)
 {
     try
     {
         WindowsIdentity  identity  = WindowsIdentity.GetCurrent();
         WindowsPrincipal principal = new WindowsPrincipal(identity);
         bool             isAdmin   = principal.IsInRole(WindowsBuiltInRole.Administrator);
         if (!isAdmin)
         {
             MessageBox.Show("Please run as administrator.", "patientXpress", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             HRDsqData.Library.WriteErrorLog("-----------------actually from here");
             Frm_settings objSetting = new Frm_settings();
             objSetting.ShowDialog();
             NewUser objnew = new NewUser();
             objnew.ShowDialog();
         }
     }
     catch (Exception pcex)
     {
         //   Library.WriteErrorLog(pcex);
     }
 }