Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Database;
- using Model;
- using MongoDB.Driver;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Windows.Forms;
- namespace View
- {
- public partial class ConsultaViabilidade : Form
- {
- public Estoque Global;
- public List<produtoHVEX> a;
- public List<Estoque> Lista_Compra;
- public ConsultaViabilidade()
- {
- InitializeComponent();
- }
- public void gerarprodutoHVEX()
- {
- var prod = MongoConnection.QueryCollection("produtohvex", Builders<produtoHVEX>.Filter.Where(c => c.codHVEX == textBox1.Text), null).First() ;
- a = MongoConnection.QueryCollection("produtohvex", Builders<produtoHVEX>.Filter.Where(c => c.codHVEX == textBox1.Text), null);
- foreach (var produto in prod.ProductCollection)
- {
- if (produto.quantidade == 0)
- {
- button2.Enabled = false;
- Lista_Compra.Add(produto);
- }
- Global = produto;
- }
- if (button2.Enabled)
- {
- button1.Enabled = false;
- }
- }
- private void button1_Click(object sender, EventArgs e)
- {
- Relatoriodeinsumos menu = new Relatoriodeinsumos();
- menu.Show();
- this.Visible = false;
- }
- private void button2_Click(object sender, EventArgs e)
- {
- ListadeCompras menu = new ListadeCompras();
- menu.Show();
- this.Visible = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement