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