public void RemoveCardboardFormat(DCCardboadFormat cbFormat) { PLMPackEntities db = new PLMPackEntities(); CardboardFormat cf = CardboardFormat.GetById(db, cbFormat.ID); cf.Delete(db); }
public DCCardboadFormat UpdateCardboardFormat(DCCardboadFormat cbFormat) { PLMPackEntities db = new PLMPackEntities(); CardboardFormat cf = CardboardFormat.GetById(db, cbFormat.ID); cf.Name = cbFormat.Name; cf.Description = cbFormat.Description; cf.Length = cbFormat.Length; cf.Width = cbFormat.Width; db.SaveChanges(); return(cbFormat); }
public DCCardboadFormat UpdateCardboardFormat(DCCardboadFormat cbFormat) { PLMPackEntities db = new PLMPackEntities(); CardboardFormat cf = CardboardFormat.GetById(db, cbFormat.ID); cf.Name = cbFormat.Name; cf.Description = cbFormat.Description; cf.Length = cbFormat.Length; cf.Width = cbFormat.Width; db.SaveChanges(); return cbFormat; }