Example #1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     if (InventarioBLL.Buscar(1) == null)
     {
         InventarioBLL.Guardar(new Entidades.Inventarios(0));
     }
 }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Inventario inventario = InventarioBLL.Buscar(1);
            int        total;

            total             = inventario.Total;
            TotalTextBox.Text = total.ToString();
        }
        public Double ObtenerTotalInventario()
        {
            double total = 0;

            total = InventarioBLL.Buscar(1).ValorInventario;

            return(total);
        }
        public void BuscarTest()
        {
            Inventario inventario = new Inventario();
            bool       paso       = false;

            inventario = InventarioBLL.Buscar(1);

            if (inventario != null)
            {
                paso = true;
            }

            Assert.AreEqual(paso, true);
        }
        private void SyncTotal()
        {
            Inventarios total = new Inventarios();

            try
            {
                if (InventarioBLL.Buscar() != null)
                {
                    InventarioBLL.Actualizar();
                    total = InventarioBLL.Buscar();
                }
                else
                {
                    Inventarios valor = new Inventarios();
                    InventarioBLL.Guardar(valor);
                    InventarioBLL.Actualizar();
                    valor = InventarioBLL.Buscar();
                }
            }
            catch (Exception)
            {
            }
            SyncedTotaltextBox.Text = total.ValorTotalInventario.ToString();
        }