public static Receipt Receipt(int id) { Receipt p = new Receipt(); //Todo: return p; }
//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; }
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; }