public void Process() { // configure processor _product = ProductController.GetProduct(Order.Sku); _productType = ProductController.GetProductType(_product.TypeId); ContinueNow = true; // log start of execution // CreateAudit("Order Processor Started"); // process section try { while (ContinueNow) { ContinueNow = false; GetCurrentSection(); CurrentSection.Process(this); } } catch (Exception ex) { // error logging goes here... throw ex; } // log end of execution // CreateAudit("Order Processor Finished"); }
public static ISection GetCurrentSection(ProductType type, int status) { return Providers[type.ProviderName].GetCurrentSection(status); }
public static string[] GetStatuses(ProductType type) { return Providers[type.ProviderName].GetStatuses(); }
public static void UpdateProductType(ProductType entity) { DbCommand cmd = SqlHelpers.CreateCommand(ConnectionString); cmd.CommandText = "bill_PRODUCT_TYPE_Update"; cmd.AddInputParam("@ProductTypeID", DbType.Guid, entity.Id); cmd.AddInputParam("@ProductType", DbType.AnsiString, entity.Name); cmd.AddInputParam("@ProviderName", DbType.AnsiString, entity.ProviderName); //cmd.AddInputParam("@CreationDate", DbType.DateTime, entity.CreatedOn); //cmd.AddInputParam("@LastEditDate", DbType.DateTime, entity.LastUpdatedOn); SqlHelpers.ExecuteNonQuery(cmd); }