private void cancelar_Click(object sender, EventArgs e) { this.Hide(); VControlCategoria vControlCategoria = new VControlCategoria(); vControlCategoria.ShowDialog(); this.Close(); }
private void AgregarCategoria_Click(object sender, EventArgs e) { /*ProductoDTO pProductoDTO=new ProductoDTO(); * pProductoDTO.Id = ProductoDTO.Id; * pProductoDTO.Nombre = Nombre.Text; * pProductoDTO.Descripcion= Descripcion.Text; * pProductoDTO.StockMinimo= Convert.ToInt32(StockMinimo.Text); * pProductoDTO.PorcentajeDeGanancia = Convert.ToDouble(PorcentajeDeGanancia.Text); * pProductoDTO.PrecioDeCompra= Convert.ToDouble(precioCompra.Text);*/ this.Hide(); VControlCategoria vControlCategoria = new VControlCategoria();//pProductoDTO); vControlCategoria.ShowDialog(); this.Close(); }
private void guardar_Click(object sender, EventArgs e) { if (this.nombreCategoria.Text == "" || this.descripcionCategoria.Text == "") { MessageBox.Show("Tiene que completar los campos obligatorios"); } else { CategoriaProductoDTO categoriaProductoDTO = new CategoriaProductoDTO(); if (categoriaDTO != null) { categoriaProductoDTO.Id = categoriaDTO.Id; } categoriaProductoDTO.Nombre = nombreCategoria.Text; categoriaProductoDTO.Descripcion = descripcionCategoria.Text; if (siVence.Checked) { categoriaProductoDTO.Vence = true; } else { categoriaProductoDTO.Vence = false; } controladorFachada.AgregarModificarCategoria(categoriaProductoDTO); if (Ventana == 1) { this.Hide(); this.Close(); } else { this.Hide(); VControlCategoria vControlCategoria = new VControlCategoria(); vControlCategoria.ShowDialog(); this.Close(); } } }