/// <summary> /// Updates this instance of OrderItem. Returns true on success. /// </summary> /// <returns>bool</returns> private bool Update() { return(DBOrderItem.Update( this.guid, this.orderID, this.productID, this.quantity, this.unitPrice, this.price, this.discountAmount, this.originalProductCost, this.attributeDescription, this.attributesXml)); }
public static int GetCountBySearch( int siteID, int stateID, int orderStatus, int paymentMethod, int shippingMethod, DateTime?fromDate, DateTime?toDate, decimal?fromOrderTotal, decimal?toOrderTotal, Guid?userGuid, string keyword) { return(DBOrderItem.GetCountBySearch(siteID, stateID, orderStatus, paymentMethod, shippingMethod, fromDate, toDate, fromOrderTotal, toOrderTotal, userGuid, keyword)); }
/// <summary> /// Persists a new instance of OrderItem. Returns true on success. /// </summary> /// <returns></returns> private bool Create() { this.guid = Guid.NewGuid(); int rowsAffected = DBOrderItem.Create( this.guid, this.orderID, this.productID, this.quantity, this.unitPrice, this.price, this.discountAmount, this.originalProductCost, this.attributeDescription, this.attributesXml); return(rowsAffected > 0); }
public static List <OrderItem> GetPageBySearch( int siteID, int stateID, int orderStatus, int paymentMethod, int shippingMethod, DateTime?fromDate, DateTime?toDate, decimal?fromOrderTotal, decimal?toOrderTotal, Guid?userGuid, string keyword, int pageNumber, int pageSize) { IDataReader reader = DBOrderItem.GetPageBySearch(siteID, stateID, orderStatus, paymentMethod, shippingMethod, fromDate, toDate, fromOrderTotal, toOrderTotal, userGuid, keyword, pageNumber, pageSize); return(LoadListFromReader(reader, true)); }
/// <summary> /// Gets an instance of OrderItem. /// </summary> /// <param name="guid"> guid </param> private void GetOrderItem( Guid guid) { using (IDataReader reader = DBOrderItem.GetOne( guid)) { if (reader.Read()) { this.guid = new Guid(reader["Guid"].ToString()); this.orderID = Convert.ToInt32(reader["OrderID"]); this.productID = Convert.ToInt32(reader["ProductID"]); this.quantity = Convert.ToInt32(reader["Quantity"]); this.unitPrice = Convert.ToDecimal(reader["UnitPrice"]); this.price = Convert.ToDecimal(reader["Price"]); this.discountAmount = Convert.ToDecimal(reader["DiscountAmount"]); this.originalProductCost = Convert.ToDecimal(reader["OriginalProductCost"]); this.attributeDescription = reader["AttributeDescription"].ToString(); this.attributesXml = reader["AttributesXml"].ToString(); } } }
public static List <OrderItem> GetByOrder(int orderId) { IDataReader reader = DBOrderItem.GetByOrder(orderId); return(LoadListFromReader(reader)); }
public static bool Delete(Guid guid) { return(DBOrderItem.Delete(guid)); }