Beispiel #1
0
        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;
        }
Beispiel #2
0
		private void detach_Invoices(Invoice entity)
		{
			this.SendPropertyChanging();
			entity.Manager = null;
		}
Beispiel #3
0
 partial void DeleteInvoice(Invoice instance);
Beispiel #4
0
		private void attach_Invoices(Invoice entity)
		{
			this.SendPropertyChanging();
			entity.Manager = this;
		}
Beispiel #5
0
 partial void UpdateInvoice(Invoice instance);
Beispiel #6
0
 partial void InsertInvoice(Invoice instance);
Beispiel #7
0
		private void detach_Invoices(Invoice entity)
		{
			this.SendPropertyChanging();
			entity.Librarian = null;
		}
Beispiel #8
0
		private void attach_Invoices(Invoice entity)
		{
			this.SendPropertyChanging();
			entity.Librarian = this;
		}
Beispiel #9
0
		private void detach_Invoices(Invoice entity)
		{
			this.SendPropertyChanging();
			entity.BookCopy = null;
		}
Beispiel #10
0
		private void attach_Invoices(Invoice entity)
		{
			this.SendPropertyChanging();
			entity.BookCopy = this;
		}