示例#1
0
        private void txtSupplier_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (KeyPressHelper.IsEnter(e))
            {
                var supplierName = ((AdvancedTextbox)sender).Text;

                ISupplierBll bll            = new SupplierBll(_log);
                var          listOfSupplier = bll.GetByName(supplierName);

                if (listOfSupplier.Count == 0)
                {
                    MsgHelper.MsgWarning("Data supplier tidak ditemukan");
                    txtSupplier.Focus();
                    txtSupplier.SelectAll();
                }
                else if (listOfSupplier.Count == 1)
                {
                    _supplier        = listOfSupplier[0];
                    txtSupplier.Text = _supplier.nama_supplier;
                    KeyPressHelper.NextFocus();
                }
                else // data lebih dari satu
                {
                    var frmLookup = new FrmLookupReferensi("Data Supplier", listOfSupplier);
                    frmLookup.Listener = this;
                    frmLookup.ShowDialog();
                }
            }
        }
        private void txtKodeProduk_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (KeyPressHelper.IsEnter(e))
            {
                var keyword = ((AdvancedTextbox)sender).Text;

                IProdukBll produkBll = new ProdukBll(MainProgram.isUseWebAPI, MainProgram.baseUrl, _log);
                this._produk = produkBll.GetByKode(keyword);

                if (this._produk == null)
                {
                    var listOfProduk = produkBll.GetByName(keyword);

                    if (listOfProduk.Count == 0)
                    {
                        MsgHelper.MsgWarning("Data produk tidak ditemukan");
                        txtKodeProduk.Focus();
                        txtKodeProduk.SelectAll();

                        ResetBarcode();
                    }
                    else if (listOfProduk.Count == 1)
                    {
                        this._produk = listOfProduk[0];

                        SetDataProduk(this._produk);
                        PreviewBarcode();
                    }
                    else // data lebih dari satu, tampilkan form lookup
                    {
                        var frmLookup = new FrmLookupReferensi("Data Produk", listOfProduk);
                        frmLookup.Listener = this;
                        frmLookup.ShowDialog();
                    }
                }
                else
                {
                    SetDataProduk(this._produk);
                    PreviewBarcode();
                }
            }
        }
示例#3
0
        private void txtCustomer_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (KeyPressHelper.IsEnter(e))
            {
                var customerName = ((AdvancedTextbox)sender).Text;

                if (customerName.Length == 0)
                {
                    ShowMessage("Nama pelanggan tidak boleh kosong", true);
                    return;
                }

                ICustomerBll bll            = new CustomerBll(_log);
                var          listOfCustomer = bll.GetByName(customerName);

                if (listOfCustomer.Count == 0)
                {
                    ShowMessage("Data pelanggan tidak ditemukan", true);

                    txtCustomer.Focus();
                    txtCustomer.SelectAll();
                }
                else if (listOfCustomer.Count == 1)
                {
                    _customer        = listOfCustomer[0];
                    txtCustomer.Text = _customer.nama_customer;

                    ShowMessage("");
                    lblStatusBar.Text = lblStatusBar.Text.Replace("Cari Pelanggan", "Reset Pelanggan");

                    KeyPressHelper.NextFocus();
                }
                else // data lebih dari satu
                {
                    var frmLookup = new FrmLookupReferensi("Data Pelanggan", listOfCustomer);
                    frmLookup.Listener = this;
                    frmLookup.ShowDialog();
                }
            }
        }
        private void txtNamaProduk_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (KeyPressHelper.IsEnter(e))
            {
                var keyword = ((AdvancedTextbox)sender).Text;

                IProdukBll produkBll = new ProdukBll(_log);
                this._produk = produkBll.GetByKode(keyword);

                if (this._produk == null)
                {
                    var listOfProduk = produkBll.GetByName(keyword);

                    if (listOfProduk.Count == 0)
                    {
                        MsgHelper.MsgWarning("Data produk tidak ditemukan");
                        txtNamaProduk.Focus();
                        txtNamaProduk.SelectAll();
                    }
                    else if (listOfProduk.Count == 1)
                    {
                        this._produk = listOfProduk[0];

                        FillListProduk(this._produk);
                    }
                    else // data lebih dari satu
                    {
                        var frmLookup = new FrmLookupReferensi("Data Produk", listOfProduk);
                        frmLookup.Listener = this;
                        frmLookup.ShowDialog();
                    }
                }
                else
                {
                    FillListProduk(this._produk);
                }
            }
        }
        private void gridControl_CurrentCellKeyDown(object sender, KeyEventArgs e)
        {
            if (KeyPressHelper.IsEnter(e))
            {
                var grid = (GridControl)sender;

                var rowIndex = grid.CurrentCell.RowIndex;
                var colIndex = grid.CurrentCell.ColIndex;

                JenisPengeluaran jenisPengeluaran = null;

                switch (colIndex)
                {
                case 2:     // pencarian berdasarkan nama jenis pengeluaran

                    GridCurrentCell cc         = grid.CurrentCell;
                    var             namaProduk = cc.Renderer.ControlValue.ToString();

                    IJenisPengeluaranBll bll   = new JenisPengeluaranBll(MainProgram.isUseWebAPI, MainProgram.baseUrl, _log);
                    var listOfJenisPengeluaran = bll.GetByName(namaProduk);

                    if (listOfJenisPengeluaran.Count == 0)
                    {
                        MsgHelper.MsgWarning("Data jenis pengeluaran tidak ditemukan");
                        GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                    }
                    else if (listOfJenisPengeluaran.Count == 1)
                    {
                        jenisPengeluaran = listOfJenisPengeluaran[0];

                        if (!IsExist(jenisPengeluaran.jenis_pengeluaran_id))
                        {
                            SetItemJenisPengeluaran(grid, rowIndex, colIndex, jenisPengeluaran);
                            grid.Refresh();
                            RefreshTotal();

                            GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex + 1);
                        }
                        else
                        {
                            MsgHelper.MsgWarning("Data jenis pengeluaran sudah diinputkan");
                            GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex);
                        }
                    }
                    else     // data lebih dari satu, tampilkan form lookup
                    {
                        _rowIndex = rowIndex;
                        _colIndex = colIndex;

                        var frmLookup = new FrmLookupReferensi("Data Jenis Pengeluaran", listOfJenisPengeluaran);
                        frmLookup.Listener = this;
                        frmLookup.ShowDialog();
                    }

                    break;

                case 3:
                    GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex + 1);
                    break;

                case 4:
                    if (grid.RowCount == rowIndex)
                    {
                        _listOfItemPengeluaran.Add(new ItemPengeluaranBiaya());
                        grid.RowCount = _listOfItemPengeluaran.Count;
                    }

                    GridListControlHelper.SetCurrentCell(grid, rowIndex + 1, 2);     // fokus ke kolom kode produk
                    break;

                default:
                    break;
                }
            }
        }
示例#6
0
        private void gridControl_CurrentCellKeyDown(object sender, KeyEventArgs e)
        {
            if (KeyPressHelper.IsEnter(e))
            {
                var grid = (GridControl)sender;

                var rowIndex = grid.CurrentCell.RowIndex;
                var colIndex = grid.CurrentCell.ColIndex;

                IProdukBll      bll    = new ProdukBll(_log);
                Produk          produk = null;
                GridCurrentCell cc;

                switch (colIndex)
                {
                case 2:     // kode produk
                    _isValidKodeProduk = false;

                    cc = grid.CurrentCell;
                    var kodeProduk = cc.Renderer.ControlValue.ToString();

                    if (kodeProduk.Length == 0)     // kode produk kosong
                    {
                        // fokus ke kolom nama produk
                        GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex + 1);
                    }
                    else
                    {
                        // pencarian berdasarkan kode produk
                        produk = bll.GetByKode(kodeProduk);

                        if (produk == null)
                        {
                            MsgHelper.MsgWarning("Data produk tidak ditemukan");
                            GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                            return;
                        }

                        _isValidKodeProduk = true;

                        if (!IsExist(produk.produk_id))
                        {
                            double diskon = produk.diskon > 0 ? produk.diskon : produk.Golongan.diskon;

                            SetItemProduk(grid, rowIndex, colIndex, produk, diskon: diskon);
                            grid.Refresh();
                            RefreshTotal();

                            GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex + 2);
                        }
                        else
                        {
                            MsgHelper.MsgWarning("Data produk sudah diinputkan");
                            GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex);
                        }
                    }

                    break;

                case 3:     // pencarian berdasarkan nama produk

                    cc = grid.CurrentCell;
                    var namaProduk = cc.Renderer.ControlValue.ToString();

                    if (!_isValidKodeProduk)
                    {
                        var listOfProduk = bll.GetByName(namaProduk);

                        if (listOfProduk.Count == 0)
                        {
                            MsgHelper.MsgWarning("Data produk tidak ditemukan");
                            GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                        }
                        else if (listOfProduk.Count == 1)
                        {
                            produk = listOfProduk[0];

                            if (!IsExist(produk.produk_id))
                            {
                                double diskon = produk.diskon > 0 ? produk.diskon : produk.Golongan.diskon;

                                SetItemProduk(grid, rowIndex, colIndex, produk, diskon: diskon);
                                grid.Refresh();
                                RefreshTotal();

                                GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex + 1);
                            }
                            else
                            {
                                MsgHelper.MsgWarning("Data produk sudah diinputkan");
                                GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex);
                            }
                        }
                        else     // data lebih dari satu
                        {
                            _rowIndex = rowIndex;
                            _colIndex = colIndex;

                            var frmLookup = new FrmLookupReferensi("Data Produk", listOfProduk);
                            frmLookup.Listener = this;
                            frmLookup.ShowDialog();
                        }
                    }
                    else
                    {
                        GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex + 1);
                    }

                    break;

                case 4:     // jumlah
                case 5:     // diskon
                    GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex + 1);
                    break;

                case 6:
                    if (grid.RowCount == rowIndex)
                    {
                        _listOfItemJual.Add(new ItemJualProduk());
                        grid.RowCount = _listOfItemJual.Count;
                    }

                    GridListControlHelper.SetCurrentCell(grid, rowIndex + 1, 2);     // fokus ke kolom kode produk
                    break;

                default:
                    break;
                }
            }
        }
示例#7
0
        private void gridControl_CurrentCellKeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F4)
            {
                Shortcut(sender, e);
                return;
            }

            if (KeyPressHelper.IsEnter(e))
            {
                if (lblKembalian.Text.Length > 0)
                {
                    lblKembalian.Text = "";
                }

                var grid = (GridControl)sender;

                var rowIndex = grid.CurrentCell.RowIndex;
                var colIndex = grid.CurrentCell.ColIndex;

                IProdukBll      bll    = new ProdukBll(_log);
                Produk          produk = null;
                GridCurrentCell cc;

                switch (colIndex)
                {
                case 2:     // kode produk
                    cc = grid.CurrentCell;
                    var kodeProduk = cc.Renderer.ControlValue.ToString();

                    if (kodeProduk.Length == 0)     // kode produk kosong
                    {
                        // fokus ke kolom nama produk
                        GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex + 1);
                    }
                    else
                    {
                        // pencarian berdasarkan kode produk
                        produk = bll.GetByKode(kodeProduk);

                        if (produk == null)
                        {
                            ShowMessage("Data produk tidak ditemukan", true);
                            GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                            return;
                        }

                        if (!_pengaturanUmum.is_stok_produk_boleh_minus)
                        {
                            if (produk.is_stok_minus)
                            {
                                ShowMessage("Maaf stok produk tidak boleh minus", true);
                                GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                                return;
                            }
                        }

                        ShowMessage("");

                        double diskon = 0;

                        if (_customer != null)
                        {
                            diskon = _customer.diskon;
                        }

                        if (!(diskon > 0))
                        {
                            var diskonProduk = GetDiskonJualFix(produk, 1, produk.diskon);
                            diskon = diskonProduk > 0 ? diskonProduk : produk.Golongan.diskon;
                        }

                        ItemJualProduk itemJual = null;

                        // cek item produk sudah diinputkan atau belum ?
                        var itemProduk = GetExistItemProduk(produk.produk_id);

                        if (itemProduk != null)     // sudah ada, tinggal update jumlah
                        {
                            var index = _listOfItemJual.IndexOf(itemProduk);

                            UpdateItemProduk(grid, index);
                            cc.Renderer.ControlText = string.Empty;

                            itemJual = _listOfItemJual[index];
                        }
                        else
                        {
                            SetItemProduk(grid, rowIndex, produk, diskon: diskon);
                            itemJual = _listOfItemJual[rowIndex - 1];

                            if (grid.RowCount == rowIndex)
                            {
                                _listOfItemJual.Add(new ItemJualProduk());
                                grid.RowCount = _listOfItemJual.Count;
                            }
                        }

                        grid.Refresh();
                        RefreshTotal();
                        DisplayItemProduct(itemJual);

                        if (_pengaturanUmum.is_tampilkan_keterangan_tambahan_item_jual)
                        {
                            // fokus ke kolom keterangan
                            GridListControlHelper.SetCurrentCell(grid, rowIndex, 4);
                        }
                        else
                        {
                            if (_pengaturanUmum.is_fokus_input_kolom_jumlah)
                            {
                                GridListControlHelper.SetCurrentCell(grid, rowIndex, 5);     // fokus ke kolom jumlah
                            }
                            else
                            {
                                GridListControlHelper.SetCurrentCell(grid, _listOfItemJual.Count, 2);     // pindah kebaris berikutnya
                            }
                        }
                    }

                    break;

                case 3:     // pencarian berdasarkan nama produk

                    cc = grid.CurrentCell;
                    var namaProduk = cc.Renderer.ControlValue.ToString();

                    if (namaProduk.Length == 0)
                    {
                        ShowMessage("Nama produk tidak boleh kosong", true);
                        GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                        return;
                    }

                    var listOfProduk = bll.GetByName(namaProduk, false);

                    if (listOfProduk.Count == 0)
                    {
                        ShowMessage("Data produk tidak ditemukan", true);
                        GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                    }
                    else if (listOfProduk.Count == 1)
                    {
                        ShowMessage("");
                        produk = listOfProduk[0];

                        IHargaGrosirBll hargaGrosirBll = new HargaGrosirBll(_log);
                        produk.list_of_harga_grosir = hargaGrosirBll.GetListHargaGrosir(produk.produk_id).ToList();

                        if (!_pengaturanUmum.is_stok_produk_boleh_minus)
                        {
                            if (produk.is_stok_minus)
                            {
                                ShowMessage("Maaf stok produk tidak boleh minus", true);
                                GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                                return;
                            }
                        }

                        double diskon = 0;

                        if (_customer != null)
                        {
                            diskon = _customer.diskon;
                        }

                        if (!(diskon > 0))
                        {
                            var diskonProduk = GetDiskonJualFix(produk, 1, produk.diskon);
                            diskon = diskonProduk > 0 ? diskonProduk : produk.Golongan.diskon;
                        }

                        ItemJualProduk itemJual = null;

                        // cek item produk sudah diinputkan atau belum ?
                        var itemProduk = GetExistItemProduk(produk.produk_id);

                        if (itemProduk != null)     // sudah ada, tinggal update jumlah
                        {
                            var index = _listOfItemJual.IndexOf(itemProduk);

                            UpdateItemProduk(grid, index);
                            cc.Renderer.ControlText = string.Empty;

                            itemJual = _listOfItemJual[index];
                        }
                        else
                        {
                            SetItemProduk(grid, rowIndex, produk, diskon: diskon);

                            itemJual = _listOfItemJual[rowIndex - 1];

                            if (grid.RowCount == rowIndex)
                            {
                                _listOfItemJual.Add(new ItemJualProduk());
                                grid.RowCount = _listOfItemJual.Count;
                            }
                        }

                        grid.Refresh();
                        RefreshTotal();
                        DisplayItemProduct(itemJual);

                        if (_pengaturanUmum.is_tampilkan_keterangan_tambahan_item_jual)
                        {
                            // fokus ke kolom keterangan
                            GridListControlHelper.SetCurrentCell(grid, rowIndex, 4);
                        }
                        else
                        {
                            if (_pengaturanUmum.is_fokus_input_kolom_jumlah)
                            {
                                GridListControlHelper.SetCurrentCell(grid, rowIndex, 5);     // fokus ke kolom jumlah
                            }
                            else
                            {
                                GridListControlHelper.SetCurrentCell(grid, _listOfItemJual.Count, 2);     // pindah kebaris berikutnya
                            }
                        }
                    }
                    else     // data lebih dari satu
                    {
                        ShowMessage("");
                        _rowIndex = rowIndex;
                        _colIndex = colIndex;

                        var frmLookup = new FrmLookupReferensi("Data Produk", listOfProduk);
                        frmLookup.Listener = this;
                        frmLookup.ShowDialog();
                    }

                    break;

                case 4:     // keterangan
                    if (grid.RowCount == rowIndex)
                    {
                        _listOfItemJual.Add(new ItemJualProduk());
                        grid.RowCount = _listOfItemJual.Count;
                    }

                    if (_pengaturanUmum.is_fokus_input_kolom_jumlah)
                    {
                        GridListControlHelper.SetCurrentCell(grid, rowIndex, 5);     // fokus ke kolom jumlah
                    }
                    else
                    {
                        GridListControlHelper.SetCurrentCell(grid, _listOfItemJual.Count, 2);     // pindah kebaris berikutnya
                    }

                    break;

                case 5:     // jumlah
                    if (!_pengaturanUmum.is_stok_produk_boleh_minus)
                    {
                        gridControl_CurrentCellValidated(sender, new EventArgs());

                        var itemJual = _listOfItemJual[rowIndex - 1];
                        produk = itemJual.Produk;

                        var isValidStok = (produk.sisa_stok - itemJual.jumlah) >= 0;

                        if (!isValidStok)
                        {
                            ShowMessage("Maaf stok produk tidak boleh minus", true);
                            GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);

                            return;
                        }
                    }

                    if (grid.RowCount == rowIndex)
                    {
                        _listOfItemJual.Add(new ItemJualProduk());
                        grid.RowCount = _listOfItemJual.Count;
                    }

                    GridListControlHelper.SetCurrentCell(grid, _listOfItemJual.Count, 2);     // pindah kebaris berikutnya
                    break;

                case 6:     // diskon
                    if (grid.RowCount == rowIndex)
                    {
                        _listOfItemJual.Add(new ItemJualProduk());
                        grid.RowCount = _listOfItemJual.Count;
                    }

                    GridListControlHelper.SetCurrentCell(grid, _listOfItemJual.Count, 2);
                    break;

                case 7:
                    if (grid.RowCount == rowIndex)
                    {
                        _listOfItemJual.Add(new ItemJualProduk());
                        grid.RowCount = _listOfItemJual.Count;
                    }

                    GridListControlHelper.SetCurrentCell(grid, _listOfItemJual.Count, 2);     // fokus ke kolom kode produk
                    break;

                default:
                    break;
                }
            }
        }
示例#8
0
        private void gridControl_CurrentCellKeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F4)
            {
                Shortcut(sender, e);
                return;
            }

            if (KeyPressHelper.IsEnter(e))
            {
                if (lblKembalian.Text.Length > 0)
                {
                    lblKembalian.Text = "";
                }

                var grid = (GridControl)sender;

                var rowIndex = grid.CurrentCell.RowIndex;
                var colIndex = grid.CurrentCell.ColIndex;

                IProdukBll      bll    = new ProdukBll(_log);
                Produk          produk = null;
                GridCurrentCell cc;

                switch (colIndex)
                {
                case 2:     // kode produk
                    cc = grid.CurrentCell;
                    var kodeProduk = cc.Renderer.ControlValue.ToString();

                    if (kodeProduk.Length == 0)     // kode produk kosong
                    {
                        // fokus ke kolom nama produk
                        GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex + 1);
                    }
                    else
                    {
                        // pencarian berdasarkan kode produk
                        produk = bll.GetByKode(kodeProduk);

                        if (produk == null)
                        {
                            ShowMessage("Data produk tidak ditemukan");
                            GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                            return;
                        }

                        if (!_pengaturanUmum.is_stok_produk_boleh_minus)
                        {
                            if (produk.is_stok_minus)
                            {
                                ShowMessage("Maaf stok produk tidak boleh minus", true);
                                GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                                return;
                            }
                        }

                        ShowMessage("");

                        double diskon = 0;

                        if (_customer != null)
                        {
                            diskon = _customer.diskon;
                        }

                        if (!(diskon > 0))
                        {
                            var diskonProduk = GetDiskonJualFix(produk, 1, produk.diskon);
                            diskon = diskonProduk > 0 ? diskonProduk : produk.Golongan.diskon;
                        }

                        SetItemProduk(grid, rowIndex, colIndex, produk, diskon: diskon);
                        grid.Refresh();
                        RefreshTotal();

                        if (grid.RowCount == rowIndex)
                        {
                            _listOfItemJual.Add(new ItemJualProduk());
                            grid.RowCount = _listOfItemJual.Count;
                        }

                        GridListControlHelper.SetCurrentCell(grid, rowIndex + 1, 2);     // pindah kebaris berikutnya
                    }

                    break;

                case 3:     // pencarian berdasarkan nama produk

                    cc = grid.CurrentCell;
                    var namaProduk = cc.Renderer.ControlValue.ToString();

                    var listOfProduk = bll.GetByName(namaProduk);

                    if (listOfProduk.Count == 0)
                    {
                        ShowMessage("Data produk tidak ditemukan");
                        GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                    }
                    else if (listOfProduk.Count == 1)
                    {
                        ShowMessage("");
                        produk = listOfProduk[0];

                        if (!_pengaturanUmum.is_stok_produk_boleh_minus)
                        {
                            if (produk.is_stok_minus)
                            {
                                ShowMessage("Maaf stok produk tidak boleh minus", true);
                                GridListControlHelper.SelectCellText(grid, rowIndex, colIndex);
                                return;
                            }
                        }

                        double diskon = 0;

                        if (_customer != null)
                        {
                            diskon = _customer.diskon;
                        }

                        if (!(diskon > 0))
                        {
                            var diskonProduk = GetDiskonJualFix(produk, 1, produk.diskon);
                            diskon = diskonProduk > 0 ? diskonProduk : produk.Golongan.diskon;
                        }

                        SetItemProduk(grid, rowIndex, colIndex, produk, diskon: diskon);
                        grid.Refresh();
                        RefreshTotal();

                        if (grid.RowCount == rowIndex)
                        {
                            _listOfItemJual.Add(new ItemJualProduk());
                            grid.RowCount = _listOfItemJual.Count;
                        }

                        GridListControlHelper.SetCurrentCell(grid, rowIndex + 1, 2); // pindah kebaris berikutnya
                    }
                    else                                                             // data lebih dari satu
                    {
                        ShowMessage("");
                        _rowIndex = rowIndex;
                        _colIndex = colIndex;

                        var frmLookup = new FrmLookupReferensi("Data Produk", listOfProduk);
                        frmLookup.Listener = this;
                        frmLookup.ShowDialog();
                    }

                    break;

                case 4:     // jumlah
                case 5:     // diskon
                    GridListControlHelper.SetCurrentCell(grid, rowIndex, colIndex + 1);
                    break;

                case 6:
                    if (grid.RowCount == rowIndex)
                    {
                        _listOfItemJual.Add(new ItemJualProduk());
                        grid.RowCount = _listOfItemJual.Count;
                    }

                    GridListControlHelper.SetCurrentCell(grid, _listOfItemJual.Count, 2);     // fokus ke kolom kode produk
                    break;

                default:
                    break;
                }
            }
        }