Example #1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            if (!btnNew.Enabled)
            {
                return;
            }

            StockAdjustmentInfoDialog _dialog = new StockAdjustmentInfoDialog();

            _dialog.ShowDialog();

            if (_dialog.WithUpdates)
            {
                InitializeDataSource();
            }
            _dialog.Dispose(); _dialog = null;
            Materia.RefreshAndManageCurrentProcess();
        }
Example #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (!btnEdit.Enabled)
            {
                return;
            }
            if (!grdStockAdjustments.Redraw)
            {
                return;
            }
            if (grdStockAdjustments.DataSource == null)
            {
                return;
            }
            if (grdStockAdjustments.RowSel < grdStockAdjustments.Rows.Fixed)
            {
                return;
            }

            string _referenceno = "";

            if (!Materia.IsNullOrNothing(grdStockAdjustments[grdStockAdjustments.RowSel, "ReferenceNo"]))
            {
                _referenceno = grdStockAdjustments[grdStockAdjustments.RowSel, "ReferenceNo"].ToString();
            }

            StockAdjustmentInfoDialog _dialog = new StockAdjustmentInfoDialog(_referenceno);

            _dialog.ShowDialog();

            if (_dialog.WithUpdates)
            {
                InitializeDataSource();
            }
            _dialog.Dispose(); _dialog = null;
            Materia.RefreshAndManageCurrentProcess();
        }