public void Save() { EcommercePlatformDataContext db = new EcommercePlatformDataContext(); OrderEDI edi = db.OrderEDIs.Where(x => x.orderID.Equals(this.orderID)).FirstOrDefault(); if (edi != null && edi.ID > 0) { edi.filename = this.filename; edi.editext = this.editext; edi.dateGenerated = DateTime.UtcNow; } else { edi = new OrderEDI { orderID = this.orderID, filename = this.filename, editext = this.editext, dateGenerated = DateTime.UtcNow, dateAcknowledged = this.dateAcknowledged }; db.OrderEDIs.InsertOnSubmit(edi); } db.SubmitChanges(); }
partial void UpdateOrderEDI(OrderEDI instance);
partial void DeleteOrderEDI(OrderEDI instance);
partial void InsertOrderEDI(OrderEDI instance);