private void Registrar(object sender, RoutedEventArgs e) { try { Lote Lote = new Lote(); Lote.DataDeFabricacao = DataDeFabricacao.SelectedDate.Value; Lote.DataDeVencimento = DataDeVencimento.SelectedDate.Value; Lote.Corredor = Corredor.SelectionBoxItem.ToString(); Lote.Secao = Secao.SelectionBoxItem.ToString(); Lote.Gaveta = Gaveta.SelectionBoxItem.ToString(); Lote.Endereco = EnderecoDAO.GetEnderecoPorDescricao(Endereco.SelectionBoxItem.ToString()); Lote.Produto = ProdutoDAO.GetProdutoPorNome(Produto.SelectionBoxItem.ToString()); Lote.QuantidadeDeProdutos = Convert.ToInt32(QuantidadeDeProdutos.Text); if (LoteDAO.ValidarGaveta(Lote.Gaveta, Lote.Corredor, Lote.Secao)) { MessageBox.Show("Esta gaveta já esta ocupada.", "Registrar entrada de lote"); } else if (LoteController.CadastrarEntradaDeLote(Lote)) { MessageBox.Show("Lote Cadastrado com sucesso!", "Registrar saída de lote"); } else { MessageBox.Show("Por favor informe valores válidos", "Registrar entrada de lote"); } } catch (Exception) { MessageBox.Show("Por favor informe valores válidos", "Registrar entrada de lote"); } }
private void Inicilize() { conceptoMovInvController = new ConceptoMovInvController(); devolucionpController = new DevolucionpController(); devolucionController = new DevolucionController(); proveedorController = new ProveedorController(); productoController = new ProductoController(); movInvController = new MovInvController(); loteController = new LoteController(); conceptoMovInv = null; devolucion = null; partida = null; proveedor = null; producto = null; lote = null; //Listas partidas = new List <Devolucionp>(); //Variables sobreGrid = false; Subtotal = 0; Impuesto = 0; CreaDevolucion(); }
private void BtnRegistrar(object sender, RoutedEventArgs e) { int IdLote = 0; try { IdLote = Convert.ToInt32(NumeroLote.Text); if (LoteDAO.ValidarSaidaLote(IdLote)) { Lote Lote = new Lote(); Lote = LoteDAO.BuscarLote(IdLote); LoteController.CadastrarSaidaDeLote(Lote); MessageBox.Show("Lote retirado com sucesso!", "Registrar saída de lote"); } else { MessageBox.Show("Por favor informe um número de lote que esteja em estoque.", "Registrar saída de lote"); } } catch (Exception) { MessageBox.Show("Por favor informe um número válido", "Registrar saída de lote"); } }
private void Inicializa() { empresaController = new EmpresaController(); traspasoController = new TraspasoController(); loteController = new LoteController(); traspasoController = new TraspasoController(); traspasopController = new TraspasopController(); productoController = new ProductoController(); movInvController = new MovInvController(); traspaso = null; partidas = new List <Traspasop>(); empresa = empresaController.SelectTopOne(); Ambiente.BorrarFile(empresa.DirectorioTrabajo + @"\PH.XLSX"); Ambiente.BorrarFile(empresa.DirectorioTrabajo + @"\PD.XLSX"); //Ambiente.VaciarDirectorio(empresa.DirectorioTraspasos); TxtOrigen.Text = ""; TxtDestino.Text = ""; TxtDocumento.Text = ""; TxtFechaDoc.Text = ""; TxtEnviadoPor.Text = ""; TxtSubtotal.Text = ""; TxtImpuesto.Text = ""; TxtTotal.Text = ""; Malla.Rows.Clear(); CargaTraspasosPendientes(); }
protected void Page_Load(object sender, EventArgs e) { LoteController lc = new LoteController(); List <Lote> lista = lc.ListarTodos(); gvLote.DataSource = lista.OrderBy(c => c.Nome); gvLote.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoteController lc = new LoteController(); ddlLote.DataSource = lc.ListarTodos(); ddlLote.DataBind(); } }
private void Inicializa() { //listas lotes = new List <Lote>(); //Controladores loteController = new LoteController(); productoController = new ProductoController(); //obajetos producto = new Producto(); lote = new Lote(); }
private void ResetPDT() { productoController = new ProductoController(); sucursalController = new SucursalController(); loteController = new LoteController(); traspasoController = new TraspasoController(); traspasopController = new TraspasopController(); movInvController = new MovInvController(); empresaController = new EmpresaController(); //listas partidas = new List <Traspasop>(); // Objetos traspaso = null; empresa = empresaController.SelectTopOne(); producto = null; sucursalO = null; lote = null; //Variables Subtotal = 0; Impuesto = 0; sobreGrid = false; SigPartida = 0; TxtOrigen.Text = ""; TxtDestino.Text = ""; TxtDocumento.Text = ""; TxtProductoId.Text = ""; NCantidad.Value = 1; TxtImpuestos.Text = ""; TxtSubtotal.Text = ""; TxtTotal.Text = ""; TxtDescripcion.Text = ""; TxtLoteId.Text = ""; TxtNoLote.Text = ""; TxtCaducidad.Text = ""; Malla.Rows.Clear(); MallaLote.Rows.Clear(); for (int i = 0; i < NPARTIDAS; i++) { Malla.Rows.Add(); Malla.Rows[i].Cells[3].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[4].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[6].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[8].Style.BackColor = Color.Yellow; } CreaTraspaso(); }
protected void btnSalvar_Click(object sender, EventArgs e) { Lote l = new Lote(); l.Nome = txtNome.Text; l.Descricao = txtDescricao.Text; LoteController lo = new LoteController(); lo.Adicionar(l); txtNome.Text = ""; txtDescricao.Text = ""; }
private void ResetPDV() { venta = new Venta(); partidas = new List <Ventap>(); cliente = null; producto = null; SigPartida = 0; datosCliente = "PUBLICO EN GENERAL"; TxtSubtotal.Text = ""; TxtTotal.Text = ""; TxtCliente.Text = ""; ventaController = new VentaController(); ventapController = new VentapController(); productoController = new ProductoController(); clienteController = new ClienteController(); ImpuestoController = new ImpuestoController(); empresaController = new EmpresaController(); loteController = new LoteController(); movInvController = new MovInvController(); flujoController = new FlujoController(); reporteController = new ReporteController(); dymErrorController = new DymErrorController(); formaPagoController = new FormaPagoController(); loteVentapController = new LoteVentapController(); oCFDI = new CFDI(); lote = null; TxtProductoId.Focus(); //Reset malla Malla.Rows.Clear(); for (int i = 0; i < NPARTIDAS; i++) { Malla.Rows.Add(); Malla.Rows[i].Cells[2].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[8].Style.BackColor = Color.Yellow; } CreaVenta(); }
private void Incializa() { tipoInventarioController = new TipoInventarioController(); productoController = new ProductoController(); inventarioController = new InventarioController(); inventariopController = new InventariopController(); loteController = new LoteController(); movInvController = new MovInvController(); tipoInventario = null; producto = null; lote = null; inventario = null; categoria = null; partida = null; Costo = 0; partidas = new List <Inventariop>();; CreaInventario(); TxtTipoInv.Focus(); }
private void Initialize() { //Controllers productoSustanciaController = new ProductoSustanciaController(); cierreInventariopController = new CierreInventariopController(); productoImpuestoController = new ProductoImpuestoController(); cierreInventarioController = new CierreInventarioController(); migrationTableController = new MigrationTableController(); migrationFieldController = new MigrationFieldController(); presentacionController = new PresentacionController(); laboratorioController = new LaboratorioController(); categoriaController = new CategoriaController(); sustanciaController = new SustanciaController(); productoController = new ProductoController(); loteController = new LoteController(); movInvController = new MovInvController(); //Objetos productoSustancia = null; productoImpuesto = null; cierreInventario = null; cierreInventariop = null; migrationTable = null; migrationField = null; presentacion = null; laboratorio = null; categoria = null; sustancia = null; producto = null; lote = null; //Listas productoSustancias = new List <ProductoSustancia>(); productoImpuestos = new List <ProductoImpuesto>(); migrationTables = new List <MigrationTable>(); migrationFields = new List <MigrationField>(); presentaciones = new List <Presentacion>(); laboratorios = new List <Laboratorio>(); categorias = new List <Categoria>(); sustancias = new List <Sustancia>(); productos = new List <Producto>(); lotes = new List <Lote>(); try { //Conexion vfpro Sql = ""; dataTable = new DataTable(); connectionstring = "Provider=VFPOLEDB.1;Data Source=" + Ambiente.Empresa.MicroPvdb + ";"; oleDbConnection = new OleDbConnection(connectionstring); oleDbConnection.Open(); //Llena combo tablas migrationTables = migrationTableController.SelectAll(); CboTabla.DataSource = migrationTables; CboTabla.DisplayMember = "Tabla"; CboTabla.ValueMember = "MigrationTableId"; CboTabla.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void ResetPDC() { //objetos compra = new Compra(); comprap = new Comprap(); producto = new Producto(); proveedor = new Proveedor(); cambioPrecio = new CambiosPrecio(); empresa = new EmpresaController().SelectTopOne(); //listas partidas = new List <Comprap>(); impuestos = new List <Impuesto>(); lotes = new List <Lote>(); productosActualizados = new List <Producto>(); //Controladores compraController = new CompraController(); comprapController = new ComprapController(); loteController = new LoteController(); movInvController = new MovInvController(); flujoController = new FlujoController(); productoController = new ProductoController(); laboratorioController = new LaboratorioController(); cambioPrecioController = new CambioPrecioController(); //Variables SigPartida = 0; subtotal = 0; impuesto = 0; sobreGrid = false; //Reset malla Malla.Rows.Clear(); GridImpuestos.Rows.Clear(); for (int i = 0; i < NPARTIDAS; i++) { Malla.Rows.Add(); Malla.Rows[i].Cells[4].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[6].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[8].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[9].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[14].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[15].Style.BackColor = Color.Yellow; } TxtProvedorId.Text = ""; TxtFacturaProveedor.Text = ""; DpFechaDoc.Value = DateTime.Now; DpFechaVencimiento.Value = DateTime.Now; TxtDatosProveedor.Text = ""; TxtProductoId.Text = ""; NCantidad.Value = 1; TxtPrecioCompra.Text = ""; TxtPrecioCaja.Text = ""; NDesc.Value = 0; TxtDescripcion.Text = ""; TxtU1.Text = ""; TxtU2.Text = ""; TxtU3.Text = ""; TxtU4.Text = ""; TxtPrecio1.Text = ""; TxtPrecio2.Text = ""; TxtPrecio3.Text = ""; TxtPrecio4.Text = ""; TxtPrecioS1.Text = ""; TxtPrecioS2.Text = ""; TxtPrecioS3.Text = ""; TxtPrecioS4.Text = ""; PbxImagen.Image = null; TxtSubtotal.Text = ""; TxtImpuestos.Text = ""; TxtTotal.Text = ""; CreaCompra(); }