Exemplo n.º 1
0
        public void load_products()
        {
            dataGridView1.Rows.Clear();
            List <ProductObj> list = ProductObj.getAll();

            for (int i = 0; i < list.Count; i++)
            {
                //MessageBox.Show(input + " - " + output);
                dataGridView1.Rows.Add(list[i].id, list[i].unit, list[i].name, list[i].price_in, list[i].price_out);
            }
        }
Exemplo n.º 2
0
        public void load_products()
        {
            dataGridView1.Rows.Clear();
            List <ProductObj> list = ProductObj.getAll();

            for (int i = 0; i < list.Count; i++)
            {
                int input  = OperationObj.getSumByProduct(list[i].id, 1);
                int output = OperationObj.getSumByProduct(list[i].id, 2);
                //MessageBox.Show(input + " - " + output);
                dataGridView1.Rows.Add(list[i].id, list[i].name, (input - output));
            }
        }
Exemplo n.º 3
0
 public Re()
 {
     InitializeComponent();
     prods = ProductObj.getAll();
     provs = PersonObj.getAllByKindId(2);
     foreach (ProductObj p in prods)
     {
         product.Items.Add(p.name);
     }
     foreach (PersonObj p in provs)
     {
         provider.Items.Add(p.name + " " + p.lastname);
     }
     data.Columns.Add("id", "Id");
     data.Columns.Add("unidad", "Unidad");
     data.Columns.Add("nombre", "Nombre");
     data.Columns.Add("cantidad", "Cantidad");
     data.Columns.Add("precio", "Precio");
     data.Columns[0].Width = 50;
     data.Columns[1].Width = 100;
     data.Columns[2].Width = 350;
     data.Columns[3].Width = 100;
     data.Columns[4].Width = 100;
 }