Ejemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ProductionCustomers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProductionCustomers(ProductionCustomer productionCustomer)
 {
     base.AddObject("ProductionCustomers", productionCustomer);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new ProductionCustomer 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>
 public static ProductionCustomer CreateProductionCustomer(global::System.Decimal id, global::System.String code, global::System.String name)
 {
     ProductionCustomer productionCustomer = new ProductionCustomer();
     productionCustomer.ID = id;
     productionCustomer.Code = code;
     productionCustomer.Name = name;
     return productionCustomer;
 }
        public ActionResult _InsertCustomer()
        {
            CST.Prdn.Data.ProductionCustomer newCustomer = new CST.Prdn.Data.ProductionCustomer();

            if (TryUpdateModel(newCustomer))
            {
                PrdnDBContext.ProductionCustomers.AddObject(newCustomer);
                PrdnDBContext.SaveChanges();
            }

            return View(CustViewList());
        }