Esempio n. 1
0
 // If your activity returns a value, derive from CodeActivity<TResult>
 // and return the value from the Execute method.
 protected override void Execute(CodeActivityContext context)
 {
     try {
         int entityType = (int)NotificationType.Get(context);
         if (entityType == (int)EnumNotificationEntity.Scale)
         {
             string       conString = System.Configuration.ConfigurationManager.ConnectionStrings["smARTDBContext"].ConnectionString;
             ScaleLibrary scaleLib  = new ScaleLibrary(conString);
             Scale        scale     = scaleLib.GetByID(EntityID.Get(context), new string[] { "Dispatch_Request_No", "Party_ID", "Purchase_Order", "Container_No", "Party_Address", "Sales_Order", "Invoice" });
             scale.Send_Mail = true;
             scaleLib.Modify(scale, new string[] { "Dispatch_Request_No", "Party_ID", "Purchase_Order", "Container_No", "Party_Address", "Sales_Order", "Invoice" });
         }
     }
     catch (Exception ex) {
         ExceptionFormatter formater          = new ExceptionFormatter();
         string             formatedException = formater.Format("Send mail update log error", ex);
         Common.MessageLogger.Instance.LogMessage(ex, formatedException, Common.Priority.High, 0, System.Diagnostics.TraceEventType.Critical, "WF Email Error", "Email");
         throw ex;
     }
 }
Esempio n. 2
0
 public void UpdateTicketStatus(Scale scale)
 {
     //Scale scale = _scaleLib.GetByID(id.ToString());
     scale.Lead = true;
     _scaleLib.Modify(scale, new string[] { "Party_ID", "Party_Address" });
 }