Exemplo n.º 1
0
        private void ColumnButtonCustomClick(object sender, EventArgs e)
        {
            var warehouseIoDetail = (WareHouseIODetail)this.bdsWarehouseIODetail.Current;

            if (warehouseIoDetail == null || warehouseIoDetail.MedicineId == 0)
            {
                return;
            }
            var chooser = new MedicineOutputChooser(warehouseIoDetail.MedicineId, this._warehouseIo.Date);
            var result  = chooser.ShowDialog(this);

            if (result == DialogResult.No)
            {
                return;
            }

            var warehouseDetail = chooser.SelectedVWareHouseDetail;
            var item            = (DataGridViewTextBoxDropDownColumn)sender;

            item.Text = warehouseDetail.LotNo;
            warehouseIoDetail.LotNo = warehouseDetail.LotNo;
            grd.CurrentCell.Value   = warehouseDetail.LotNo;
            //warehouseIoDetail.ExpireDate = warehouseIoDetail.ExpireDate;
            //warehouseIoDetail.LotNo = warehouseIoDetail.LotNo;
            //warehouseIoDetail.InStockQty = warehouseIoDetail.Qty;

            this.grd.EndEdit();
            this.grd.ResetBindings();
            this.grd.Refresh();
        }
Exemplo n.º 2
0
        private void ColumnButtonCustomClick(object sender, EventArgs e)
        {
            var warehouseIoDetail = (WareHouseIODetail)this.bdsWarehouseIODetail.Current;
            if (warehouseIoDetail == null || warehouseIoDetail.MedicineId == 0) return;
            var chooser = new MedicineOutputChooser(warehouseIoDetail.MedicineId, this._warehouseIo.Date);
            var result = chooser.ShowDialog(this);
            if (result == DialogResult.No) return;

            var warehouseDetail = chooser.SelectedVWareHouseDetail;
            var item = (DataGridViewTextBoxDropDownColumn) sender;
            item.Text = warehouseDetail.LotNo;
            warehouseIoDetail.LotNo = warehouseDetail.LotNo;
            grd.CurrentCell.Value = warehouseDetail.LotNo;
            //warehouseIoDetail.ExpireDate = warehouseIoDetail.ExpireDate;
            //warehouseIoDetail.LotNo = warehouseIoDetail.LotNo;
            //warehouseIoDetail.InStockQty = warehouseIoDetail.Qty;

            this.grd.EndEdit();
            this.grd.ResetBindings();
            this.grd.Refresh();
        }