コード例 #1
0
 public void Process(OrderProcessor processor)
 {
     // set processor reference
     orderProcessor = processor;
     // audit
     orderProcessor.CreateAudit("PSInitialNotification started.", 20000);
     try
     {
         // send mail to customer
         orderProcessor.MailCustomer("CdShop order received.", GetMailBody());
         // audit
         orderProcessor.CreateAudit(
             "Notification e-mail sent to customer.", 20002);
         // update order status
         orderProcessor.Order.UpdateStatus(1);
         // continue processing
         orderProcessor.ContinueNow = true;
     }
     catch
     {
         // mail sending failure
         throw new OrderProcessorException("Unable to send e-mail to customer.", 0);
     }
     // audit
     processor.CreateAudit("PSInitialNotification finished.", 20001);
 }
コード例 #2
0
 public void Process(OrderProcessor processor)
 {
     // set processor reference
     orderProcessor = processor;
     // audit
     orderProcessor.CreateAudit("PSFinalNotification started.",
                                20700);
     try
     {
         // send mail to customer
         orderProcessor.MailCustomer("BalloonShop order dispatched.",
                                     GetMailBody());
         // audit
         orderProcessor.CreateAudit(
             "Dispatch e-mail sent to customer.", 20702);
         // update order status
         orderProcessor.Order.UpdateStatus(8);
     }
     catch
     {
         // mail sending failure
         throw new OrderProcessorException(
                   "Unable to send e-mail to customer.", 7);
     }
     // audit
     processor.CreateAudit("PSFinalNotification finished.", 20701);
 }
コード例 #3
0
 public void Process(OrderProcessor processor)
 {
     // set processor reference
       orderProcessor = processor;
       // audit
       orderProcessor.CreateAudit("PSFinalNotification started.",
     20700);
       try
       {
     // send mail to customer
     orderProcessor.MailCustomer("BalloonShop order dispatched.",
       GetMailBody());
     // audit
     orderProcessor.CreateAudit(
       "Dispatch e-mail sent to customer.", 20702);
     // update order status
     orderProcessor.Order.UpdateStatus(8);
       }
       catch
       {
     // mail sending failure
     throw new OrderProcessorException(
       "Unable to send e-mail to customer.", 7);
       }
       // audit
       processor.CreateAudit("PSFinalNotification finished.", 20701);
 }
コード例 #4
0
        public void Process(OrderProcessor processor)
        {
            // set processor reference
              orderProcessor = processor;
              // audit
              orderProcessor.CreateAudit("PSInitialNotification started.", 20000);

              try
              {
            // send mail to customer
            orderProcessor.MailCustomer("BalloonShop order received.", GetMailBody());
            // audit
            orderProcessor.CreateAudit(
              "Notification e-mail sent to customer.", 20002);
            // update order status
            orderProcessor.Order.UpdateStatus(1);
            // continue processing
            orderProcessor.ContinueNow = true;
              }
              catch
              {
            // mail sending failure
            throw new OrderProcessorException(
              "Unable to send e-mail to customer.", 0);
              }
              // audit
              processor.CreateAudit("PSInitialNotification finished.", 20001);
        }
コード例 #5
0
 public void Processor(OrderProcessor processor)
 {
     processor.CreateAudit("PsFinalNotification started.", 20700);
     processor.MailCustomer("", "");
     processor.CreateAudit("Dispatch e-mail send to customer.", 20702);
     processor.UpdateOrderStatus(8);
     processor.CreateAudit("PsFinalNotification finished.", 20701);
 }
コード例 #6
0
 public void Processor(OrderProcessor processor)
 {
     _processor = processor;
     _processor.CreateAudit("PsInitialNotification started.", 20000);
     _processor.MailCustomer("", "");
     _processor.CreateAudit("Notification e-mail sent to customer.", 20002);
     _processor.UpdateOrderStatus(1);
     _processor.ContinueNow = true;
     _processor.CreateAudit("PsInitialNotification finished.", 20001);
 }