Esempio n. 1
0
        public static void Update(receipt new_receipt, long receipt_id)
        {
            var receipt = SelectById(receipt_id);

            if (receipt != null)
            {
                receipt.payment_date = new_receipt.payment_date;
                receipt.amount       = new_receipt.amount;
                receipt.discount     = new_receipt.discount;
                receipt.paid         = new_receipt.paid;
                context.SaveChanges();
            }
        }
Esempio n. 2
0
 public static void Insert(receipt receipt)
 {
     context.receipts.Add(receipt);
     context.SaveChanges();
 }