private void Producto_BT_Click(object sender, EventArgs e) { ProductSelectForm form = new ProductSelectForm(this); if (form.ShowDialog(this) == DialogResult.OK) { _producto = form.Selected as ProductInfo; Producto_TB.Text = _producto.Nombre; } }
protected override void SelectProductNameAction() { ProductSelectForm form = new ProductSelectForm(this); if (form.ShowDialog(this) == DialogResult.OK) { ProductInfo producto = (ProductInfo)form.Selected; _entity.TipoMercancia = producto.Nombre; } }
protected override void SelectProductAction() { ProductList list = ProductList.GetListBySerie(_serie.Oid, false, true); ProductSelectForm form = new ProductSelectForm(this, list); if (form.ShowDialog(this) == DialogResult.OK) { if ((form.Selected as ProductInfo).IsKit) { PgMng.ShowInfoException(Library.Store.Resources.Messages.KIT_ENTRY_NOT_ALLOWED); return; } _product = ProductInfo.Get((form.Selected as ProductInfo).Oid, false); Products_BS.DataSource = _product; _entity.CopyFrom(_delivery, _product); if (_product.NoStockSale) { SetStockControl(false); SetStore(null); } else { if (_delivery.Rectificativo) { SelectBatchAction(); SetStockControl(false); } else { SetStockControl(true); SetStore(_delivery_store); SetExpedient(_delivery_expedient); } } Kilos_NTB.Text = _entity.CantidadKilos.ToString("N2"); Pieces_NTB.Text = _entity.CantidadBultos.ToString("N2"); SetPrice(); if (_entity.FacturacionBulto) { Pieces_NTB.Focus(); } else { Kilos_NTB.Focus(); } SaleMethod_BT.Enabled = (_product.ETipoFacturacion != ETipoFacturacion.Unitaria); } }
protected override void AddProductoAction() { ProductSelectForm form = new ProductSelectForm(this); if (form.ShowDialog(this) == DialogResult.OK) { ProductInfo item = form.Selected as ProductInfo; _entity.Productos.NewItem(_entity, item); Datos_Productos.ResetBindings(true); } }
protected virtual ProductInfo SelectProducto() { ProductList lista = ProductList.GetList(_acreedor, _serie, false, true); ProductSelectForm form = new ProductSelectForm(this, lista); form.ShowCodigoProveedor(true); if (form.ShowDialog(this) == DialogResult.OK) { ProductInfo producto = (form.Selected as ProductInfo); return(producto); } return(null); }
protected override void AddComponentAction() { ProductList list = ProductList.GetKitList(false, false); ProductSelectForm form = new ProductSelectForm(this, list); if (form.ShowDialog(this) == DialogResult.OK) { ProductInfo item = form.Selected as ProductInfo; if (_entity.Components.GetItemByComponent(item.Oid) == null) { _entity.Components.NewItem(_entity, item); } Datos_Components.ResetBindings(false); } }
private void Producto_BT_Click(object sender, EventArgs e) { ProductSelectForm form = new ProductSelectForm(this); if (form.ShowDialog(this) == DialogResult.OK) { ProductInfo item = form.Selected as ProductInfo; if (_producto == null) { _producto = item; _producto.CodigoAduanero = string.Empty; } else { _producto.Oid = item.Oid; } Producto_TB.Text = _producto.Nombre; } }
private void CustomCode_BT_Click(object sender, EventArgs e) { ProductList list = ProductList.GetByCustomCodeList(string.Empty, true, false); ProductSelectForm form = new ProductSelectForm(this, list); if (form.ShowDialog(this) == DialogResult.OK) { ProductInfo item = form.Selected as ProductInfo; if (_producto == null) { _producto = item; _producto.Oid = 0; } else { _producto.CodigoAduanero = item.CodigoAduanero; } CustomCode_TB.Text = _producto.CodigoAduanero; } }