Example #1
0
 private void sendSMS(bool bUsePostgres)
 {
     try
     {
         //Postgresql mode
         SalesPickerPostgresql sp = new SalesPickerPostgresql();
         Settings set             = Settings.Default;
         sp.UserName   = set.user;
         sp.Password   = set.password;
         sp.SendMethod = SMSSender.CommonConstants.SMS_MAS_MENSAJES;
         sp.RetrieveData();
         sp.SendSMS();
         sp.SendBossSMS();
         Console.WriteLine("*******************************************");
         Console.ReadLine();
     }
     catch (Exception e)
     {
         ErrLogger.Log(e.Message);
         ErrLogger.Log(e.StackTrace);
     }
 }
Example #2
0
        private void sendSMS(Settings set)
        {
            myEventLog.WriteEntry("Intentando envio de SMS.", EventLogEntryType.Information);

            try
            {
                //Postgresql mode
                SalesPickerPostgresql sp = new SalesPickerPostgresql();
                sp.UserName   = set.sms_user;
                sp.Password   = set.sms_password;
                sp.SendMethod = SMSSender.CommonConstants.SMS_MAS_MENSAJES;
                sp.RetrieveData();
                sp.SendSMS(myEventLog);
                sp.SendBossSMS(myEventLog);
            }
            catch (Exception e)
            {
                myEventLog.WriteEntry("Mensaje de Excepcion: " + e.Message, EventLogEntryType.Error);
                myEventLog.WriteEntry("Pila de Excepcion: " + e.StackTrace, EventLogEntryType.Error);
            }
            myEventLog.WriteEntry("Proceso de envio de SMS finalizado exitosamente.", EventLogEntryType.SuccessAudit);
        }
Example #3
0
        private void localFiles(Settings set)
        {
            myEventLog.WriteEntry("Intentando envio de SMS.", EventLogEntryType.Information);
            try
            {
                SalesPickerPostgresql sp = new SalesPickerPostgresql();

                sp.UserName   = set.sms_user;
                sp.Password   = set.sms_password;
                sp.SendMethod = SMSSender.CommonConstants.SMS_LOCAL;
                //sp.SendMethod = SMSSender.CommonConstants.SMS_MAS_MENSAJES;

                sp.RetrieveData();
                sp.SendSMS(myEventLog);
                sp.SendBossSMS(myEventLog);
            }
            catch (Exception e)
            {
                myEventLog.WriteEntry("Mensaje de Exception: " + e.Message, EventLogEntryType.Error);
                myEventLog.WriteEntry("Pila de Exception: " + e.StackTrace, EventLogEntryType.Error);
            }
            myEventLog.WriteEntry("Archivos locales de simulación de SMS generados exitosamente.", EventLogEntryType.Information);
        }
Example #4
0
        private void localFiles(bool bUsePostgresqlConfiguration)
        {
            try
            {
                Settings set             = Settings.Default;
                SalesPickerPostgresql sp = new SalesPickerPostgresql();

                sp.UserName   = set.user;
                sp.Password   = set.password;
                sp.SendMethod = SMSSender.CommonConstants.SMS_LOCAL;
                //sp.SendMethod = SMSSender.CommonConstants.SMS_MAS_MENSAJES;

                sp.RetrieveData();
                sp.SendSMS();
                sp.SendBossSMS();
            }
            catch (Exception e)
            {
                ErrLogger.Log(e.Message);
                ErrLogger.Log(e.StackTrace);
            }

            MessageBox.Show("Archivos locales de simulación de SMS generados exitosamente.", "Simulación de SMS Local", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }