/// <summary> /// Purpose: Grabs product delivery type information based on ID /// Accepts: Int /// Returns: Hashtable /// </summary> public Hashtable GetProductDeliveryTypeByID(int id) { ProductDeliveryType obj = new ProductDeliveryType(); QuickStart_DBEntities dbContext; Hashtable hsh = new Hashtable(); try { dbContext = new QuickStart_DBEntities(); obj = dbContext.ProductDeliveryTypes.FirstOrDefault(d => d.ProductDeliveryTypeID == id); if (obj != null) { hsh["productdeliverytypeid"] = obj.ProductDeliveryTypeID; hsh["deliverytypeid"] = obj.DeliveryTypeID; hsh["productcode"] = obj.ProductCode; hsh["created"] = obj.Created; hsh["modified"] = obj.Modified; } } catch (Exception ex) { ErrorLoggerData.ErrorRoutine(ex, "ProductDeliveryTypeData", "GetProductDeliveryTypeByID"); } return hsh; }
/// <summary> /// Deprecated Method for adding a new object to the ProductDeliveryTypes EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToProductDeliveryTypes(ProductDeliveryType productDeliveryType) { base.AddObject("ProductDeliveryTypes", productDeliveryType); }
/// <summary> /// Create a new ProductDeliveryType object. /// </summary> /// <param name="productDeliveryTypeID">Initial value of the ProductDeliveryTypeID property.</param> public static ProductDeliveryType CreateProductDeliveryType(global::System.Int32 productDeliveryTypeID) { ProductDeliveryType productDeliveryType = new ProductDeliveryType(); productDeliveryType.ProductDeliveryTypeID = productDeliveryTypeID; return productDeliveryType; }