public static int UpdateShoppingCartItem(WebOrderItems woItem) { int isUpdate = 0; try { string query = SQLClass.UPDATE_ITEM; NpgsqlCommand command = new NpgsqlCommand(query); command.CommandType = CommandType.Text; command.Parameters.Add("order_id", woItem.OrderId); command.Parameters.Add("item_type", woItem.ItemType); command.Parameters.Add("item_code", woItem.ItemCode); command.Parameters.Add("description", woItem.Description); command.Parameters.Add("quantity", woItem.Quantity); command.Parameters.Add("units", woItem.Units); command.Parameters.Add("price_cost", woItem.PriceCost); command.Parameters.Add("price_sell", woItem.PriceSell); command.Parameters.Add("price_total", woItem.PriceTotal); command.Parameters.Add("discount", woItem.Discount); command.Parameters.Add("remarks", woItem.Remarks); command.Parameters.Add("prodnotes", woItem.ProdNotes); command.Parameters.Add("to_edm", woItem.ToEdm); command.Parameters.Add("to_products", woItem.ToArticles); IDatabaseFactory dbFactory = new DatabaseFactory(); IDatabase dbObject = dbFactory.CreateDatabaseInstance(ACTIVE_DATABASE); isUpdate = dbObject.ExecuteQuery(command); } catch (Exception ex) { Hey.Common.Utils.LogWriter.Log(ex.Message); } return(isUpdate); }
private int UpdateWSItem(string SubItem, string ItemType, string Description, string Units, double Quantity, double PriceCost, double PriceSell, double Discount, int OrderId, string Remarks, string ProdNotes, int ToEDM, int ToProducts) { WebOrderItems wsItem = new WebOrderItems(); wsItem.OrderId = OrderId; wsItem.ItemType = ItemType; wsItem.ItemCode = SubItem; wsItem.Description = Description; wsItem.Units = Units; wsItem.Quantity = Quantity; wsItem.PriceCost = PriceCost; wsItem.PriceSell = PriceSell; wsItem.PriceTotal = wsItem.Quantity * wsItem.PriceCost; wsItem.Discount = Discount; wsItem.Remarks = Remarks; wsItem.ProdNotes = ProdNotes; wsItem.ToEdm = ToEDM; wsItem.ToArticles = ToProducts; int upItem = new FacadeManager().UpdateShoppingCartItem(wsItem); return(upItem); }
public static int UpdateShoppingCartSpecialItem(WebOrderItems woItem) { int isUpdate = 0; try { string query = SQLClass.UPDATE_ITEM; NpgsqlCommand command = new NpgsqlCommand(query); command.CommandType = CommandType.Text; command.Parameters.Add("order_id", woItem.OrderId); command.Parameters.Add("item_code", woItem.ItemCode); command.Parameters.Add("to_edm", woItem.ToEdm); command.Parameters.Add("to_articles", woItem.ToArticles); IDatabaseFactory dbFactory = new DatabaseFactory(); IDatabase dbObject = dbFactory.CreateDatabaseInstance(ACTIVE_DATABASE); isUpdate = dbObject.ExecuteQuery(command); } catch (Exception ex) { Hey.Common.Utils.LogWriter.Log(ex.Message); } return(isUpdate); }
public int UpdateShoppingCartItem(WebOrderItems woItem) { return(BusinessObjectManager.UpdateShoppingCartItem(woItem)); }
public int InsertShoppingCartItem(WebOrderItems woItem) { return(BusinessObjectManager.InsertShoppingCartItem(woItem)); }