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