private static void Main() { var provider = new FileSystemProvider("c:\\temp"); var invoice = new Invoice(provider, 67890); invoice.Save(); invoice.Load(67890); Console.WriteLine(invoice.Blob.Text); var credit = new Credit(provider, 12345, 67890); credit.Save(); credit.Load(12345); Console.WriteLine(credit.Blob.Text); Console.WriteLine(credit.InvoiceBlob.Text); var deliveryNote = new DeliveryNote(provider, 54321); deliveryNote.Save(); deliveryNote.Load(54321); Console.WriteLine(deliveryNote.Blob.Text); Console.ReadLine(); }
public int SaveDeliveryNote(DeliveryNote model, int userID = 0) { try { model.tsUpdate = DateTime.Now; model.tsUpdateUserID = userID; if (model.DeliveryNoteID == 0) { model.tsInsert = DateTime.Now; model.tsInsertUserID = userID; } model.Save(); return(model.DeliveryNoteID); } catch (Exception ex) { string error = ""; CommonMethods.getError(ex, ref error); throw new Exception(CommonMethods.ConcatenateErrorIN_DB(DB_Exception.res_26, error, CommonMethods.GetCurrentMethodName())); } }