void showProductPrompt() { _item = null; //reset the variable so next scan will take _qty = 0; _itemType = string.Empty; _bulkItemFlag = string.Empty; setPromptWidth(); txtScan.Focus(); txtScan.Clear(); // does this cause the TextChanged event? lblScan.Text = "ITEM >>"; lblProduct.Visible = false; lblItemQty.Visible = false; _entryMode = EntryMode.Product; }
void showLocationPrompt() { setPromptWidth(); txtScan.Clear(); txtScan.Focus(); lblScan.Text = "Location >>"; lblLocation.Visible = false; lblItemQty.Visible = false; _location = null; _item = null; _itemType = string.Empty; _bulkItemFlag = string.Empty; _entryMode = EntryMode.Location; }
public bool IsProductValid(MItemH item) { if (item == null || !item.IsActive) { return(false); } if (!item.Serialized) { throw new Exception("Not a serialized item."); } return(true); }
public bool AddSerialNo(MItemH item, MLoc location, string serialno, string itemType, string bulk, string userName) { var repo = _dataRepositoryFactory .GetDataRepository <ILRyderCiscoSncycCntRepository>(); var saved = repo.Add(new LRyderCiscoSncycCnt { CustCode = item.CustCode, Serial = serialno, LocCode = location.LocCode, ItemCode = item.ItemCode, ProsDateTime = DateTime.Now, UserName = userName, BulkItem = bulk, ItemType = itemType }); return(true); }
void finish() { showError(string.Format("Item '{0}' scan completed", _item.ItemCode)); switch (_entryMode) { case EntryMode.Product: case EntryMode.SerialNo: case EntryMode.ItemType: case EntryMode.Finished: _item = null; showProductPrompt(); _entryMode = EntryMode.Finished; break; } }