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