Example #1
0
File: DAL.cs Project: rodchar/csgen
        public static Receipt Receipt(int id)
        {
            Receipt p = new Receipt();
            //Todo:

            return p;
        }
Example #2
0
File: DAL.cs Project: rodchar/csgen
        //Insert new receipt
        public static int UpdateReceipt(Receipt receipt)
        {
            int newReceiptId = 0;
            //New Receipt
            if (receipt.Id == 0)
            {
                newReceiptId = daReceipts.Insert(receipt.Date, null);
            }

            return newReceiptId;
        }
Example #3
0
File: DAL.cs Project: rodchar/csgen
 public static Receipt GetReceipt(int id)
 {
     dtReceipts = daReceipts.GetDataBy(id);
     Receipt receipt = new Receipt();
     receipt.Id = dtReceipts.FirstOrDefault().Id;
     receipt.Date = dtReceipts.FirstOrDefault().Date;
     return receipt;
 }