Esempio n. 1
0
        private void CalculaTotalPedido()
        {
            TList_RegLanPedido_Item lst = (bindingSource_PedidoCab.DataSource as TList_RegLanPedido)[dataGridNavegador.CurrentRow.Index].PedidoItens;

            Vl_Total.Value = 0;
            for (Int16 x = 0; x < lst.Count; x++)
            {
                Vl_Total.Value += lst[x].Vl_subtotal - lst[x].Vl_desc;
            }
        }
Esempio n. 2
0
        public override int buscarRegistros()
        {
            decimal ped = 0;

            if (Nr_Pedido.Text != "")
            {
                ped = Convert.ToDecimal(Nr_Pedido.Text);
            }

            TList_RegLanPedido_Item list = TCN_LanPedido_Item.Busca("", "", "", ped, string.Empty, "b.ds_produto asc", false);

            if (list != null)
            {
                if (list.Count > 0)
                {
                    this.Lista = list;
                    BS_Registro_Pedido.DataSource = list;
                }

                return(list.Count);
            }

            return(0);
        }