Ejemplo n.º 1
0
 /// <summary>When the user is trying to send a text message, if sending the text would exceed the users spending limit, this handles that error.
 /// If the user has permission to increase the spending limit, open a new FormEservicesSetup to allow them to increase their spending limit,
 /// otherwise warn them that they do not have permission. Returns true if the error passed in matches the spending limit error, false otherwise. </summary>
 public static bool ProcessSendSmsException(Exception ex)
 {
     if ((ex is ODException) && ((ODException)ex).ErrorCode == 1)
     {
         if (MsgBox.Show(typeof(FormEServicesSetup), MsgBoxButtons.YesNo, ex.Message + " Do you want to increase this spending limit?"))
         {
             if (Security.IsAuthorized(Permissions.EServicesSetup))
             {
                 FormEServicesSetup formEservice = new FormEServicesSetup();
                 formEservice.Show();
             }
         }
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
        //===============================================================================================


        private void butSetup_Click(object sender, EventArgs e)
        {
            FormEServicesSetup FormESS = new FormEServicesSetup(FormEServicesSetup.EService.eConfirmRemind);

            FormESS.Show();
        }