/// <summary> /// Service that returns all items in the table to consumer /// </summary> /// <returns>List of items in DB</returns> List <Item> IGetItems.GetItems() { //Getting items from table through dao, then returning it to consumer var itemDao = new ItemDao(Properties.Settings.Default.conString); var items = itemDao.GetItems(); return(items); }
protected void Page_Load(object sender, EventArgs e) { //Getting a list of all departments and items in the database _departments = _departmentDao.GetDepartments(); _items = _itemDao.GetItems(); if (!IsPostBack) { } }
protected void Page_Load(object sender, EventArgs e) { //Getting a list of all departments and items in the database _departments = _departmentDao.GetDepartments(); _items = _itemDao.GetItems(); if (!IsPostBack) { //Setting the DropDown to only the items that fit the search criteria DrpSearch.DataTextField = "Name"; DrpSearch.DataValueField = "Name"; DrpSearch.DataSource = _items; DrpSearch.DataBind(); DrpSearch.SelectedIndex = 0; } }