static public List <Item> SelectUnreturnedItems() { ItemConnector sc = new ItemConnector(); List <Item> result = sc.SelectUnreturendItem(); return(result); }
static public List <Item> FindExpiredItem() { ItemConnector sc = new ItemConnector(); List <Item> result = sc.SelectAllItemExpiredItem(); return(result); }
static public Item FindItem(string barcodeNo) { ItemConnector sc = new ItemConnector(); Item resultItem = sc.SelectItem(barcodeNo); return(resultItem); }
public void MakeTransaction(bool status) { DateTime now = DateTime.Now; DateTime expiryDate = now.AddDays(this.ItemCategory.Duration); this.CheckoutDate = SQLDBConnector.CovertDateToDB(now); this.ExpiryDate = SQLDBConnector.CovertDateToDB(expiryDate); ItemConnector sc = new ItemConnector(); if (status) { sc.UpdateItem(this.Barcode, this.Barcode, this.ItemDescription, status, this.ItemCategory.CategoryName, "NULL", "NULL", "NULL", this.Initial); CheckLog.TransactionItem(this.StudentNo, this.Barcode, this.ItemDescription, this.Initial, status, "NULL"); } else { sc.UpdateItem(this.Barcode, this.Barcode, this.ItemDescription, status, this.ItemCategory.CategoryName, this.StudentNo, this.CheckoutDate, this.ExpiryDate, this.Initial); CheckLog.TransactionItem(this.StudentNo, this.Barcode, this.ItemDescription, this.Initial, status, this.ExpiryDate); } //CheckLog cl = new CheckLog(); }
static public void UpdateItem(string oldBarcode, string newBarcode, string itemDescription, bool status, string ItemCategory) { ItemConnector sc = new ItemConnector(); sc.UpdateItem(oldBarcode, newBarcode, itemDescription, status, ItemCategory, "", "", "", ""); }
static public void DelItem(string barcode) { ItemConnector sc = new ItemConnector(); sc.DeleteItem(barcode); }
public void AddItem() { ItemConnector sc = new ItemConnector(); sc.InsertItem(this.Barcode, this.ItemDescription, this.ItemCategory.CategoryName); }
static public void AddItem(string barcode, string itemDescription, string itemCategory) { ItemConnector sc = new ItemConnector(); sc.InsertItem(barcode, itemDescription, itemCategory); }