public int addInvoice(int uID, int copyNo, int libID, DateTime rentDate, DateTime retDate, decimal damFee, decimal odFee, decimal total) { int invNum = 0; Invoice inv; if (Program.userType == UT_LIBRARIAN) { inv = new Invoice { userID = uID, librarianID = libID, rentalDate = rentDate, returnDate = retDate, damageFee = damFee, overDueFee = odFee, totalFee = total, CopyNumber = copyNo }; } else { inv = new Invoice { userID = uID, ManagerID = libID, rentalDate = rentDate, returnDate = retDate, damageFee = damFee, overDueFee = odFee, totalFee = total, CopyNumber = copyNo }; } db.Invoices.InsertOnSubmit(inv); db.SubmitChanges(); invNum = inv.invoiceID; return invNum; }
private void detach_Invoices(Invoice entity) { this.SendPropertyChanging(); entity.Manager = null; }
partial void DeleteInvoice(Invoice instance);
private void attach_Invoices(Invoice entity) { this.SendPropertyChanging(); entity.Manager = this; }
partial void UpdateInvoice(Invoice instance);
partial void InsertInvoice(Invoice instance);
private void detach_Invoices(Invoice entity) { this.SendPropertyChanging(); entity.Librarian = null; }
private void attach_Invoices(Invoice entity) { this.SendPropertyChanging(); entity.Librarian = this; }
private void detach_Invoices(Invoice entity) { this.SendPropertyChanging(); entity.BookCopy = null; }
private void attach_Invoices(Invoice entity) { this.SendPropertyChanging(); entity.BookCopy = this; }