/// <summary> /// Create a new ProductionType object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="code">Initial value of the Code property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="prodTypeCD">Initial value of the ProdTypeCD property.</param> /// <param name="reasonID">Initial value of the ReasonID property.</param> /// <param name="locationID">Initial value of the LocationID property.</param> public static ProductionType CreateProductionType(global::System.Decimal id, global::System.String code, global::System.String name, global::System.String prodTypeCD, global::System.Decimal reasonID, global::System.Decimal locationID) { ProductionType productionType = new ProductionType(); productionType.ID = id; productionType.Code = code; productionType.Name = name; productionType.ProdTypeCD = prodTypeCD; productionType.ReasonID = reasonID; productionType.LocationID = locationID; return productionType; }
/// <summary> /// Deprecated Method for adding a new object to the ProductionTypes EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToProductionTypes(ProductionType productionType) { base.AddObject("ProductionTypes", productionType); }
public ActionResult _InsertPrdnType() { CST.Prdn.Data.ProductionType newType = new CST.Prdn.Data.ProductionType(); if (TryUpdateModel(newType)) { PrdnDBContext.ProductionTypes.AddObject(newType); PrdnDBContext.SaveChanges(); } return View(PrdnTypeGridList()); }