Beispiel #1
0
        private void SearchItem()
        {
            Item item;

            using (var frm = new SearchItemForm())
            {
                item = frm.Search();
            }
            if (item != null)
            {
                txtItemID.Text = item.ItemID;
                PopulateItemEntry();
            }
        }
Beispiel #2
0
        private string SearchItem()
        {
            string _itemid = string.Empty;
            Item   item;

            using (var frm = new SearchItemForm())
            {
                item = frm.Search();
            }
            if (item != null)
            {
                _itemid = item.ItemID;
            }
            else
            {
                _itemid = string.Empty;
            }
            return(_itemid);
        }
Beispiel #3
0
        private void AdjustmentForm_KeyUp(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.F2:
                if (btnApprove.Enabled)
                {
                    Approval();
                }
                break;

            case Keys.F3:
                if (btnSearchItem.Enabled)
                {
                    Item item;
                    using (var frm = new SearchItemForm())
                    {
                        item = frm.Search();
                    }
                    if (item != null)
                    {
                        txtItemID.Focus();
                        txtItemID.Text    = item.ItemID;
                        txtItemSeqNo.Text = item.ItemSeqNo;
                        cboItemUnit.Focus();
                    }
                    else
                    {
                        txtItemID.Text    = string.Empty;
                        txtItemSeqNo.Text = string.Empty;
                        txtItemID.Focus();
                    }
                }
                break;

            case Keys.F4:
                txtTxnNo.Focus();
                SearchAdjustTxno();
                break;

            case Keys.F5:
                if (btnClearAll.Enabled)
                {
                    _ClearAll();
                }
                break;

            case Keys.F6:
                if (btnDeleteAll.Enabled)
                {
                    if (_DeleteAll())
                    {
                        _ClearAll();
                    }
                }
                break;

            case Keys.Escape:
                Close();
                break;
            }
        }