コード例 #1
0
 public void BotaoInserir()
 {
     try
     {
         EstoqueContagemCabecalhoSelected = new InventarioContagemCabDTO();
         IsEditar = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Alerta do sistema", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
コード例 #2
0
        public void AtualizarListaEstoqueContagemCabecalho(int pagina)
        {
            try
            {
                using (ServidorClient Servico = new ServidorClient())
                {
                    if (pagina == 0)
                    {
                        IndiceNavegacao = 0;
                    }
                    else if (pagina > 0 && ListaEstoqueContagemCabecalho.Count == QuantidadePagina)
                    {
                        IndiceNavegacao += QuantidadePagina;
                    }
                    else if (pagina < 0 && IndiceNavegacao != 0)
                    {
                        IndiceNavegacao -= QuantidadePagina;
                    }

                    InventarioContagemCabDTO InventarioContagemCab = new InventarioContagemCabDTO();

                    IList <InventarioContagemCabDTO> ListaServ = Servico.SelectInventarioContagemCabPagina(IndiceNavegacao, QuantidadePagina, InventarioContagemCab);

                    ListaEstoqueContagemCabecalho.Clear();

                    foreach (InventarioContagemCabDTO objAdd in ListaServ)
                    {
                        ListaEstoqueContagemCabecalho.Add(objAdd);
                    }
                    EstoqueContagemCabecalhoSelected = null;
                }
                QuantidadeCarregada = ListaEstoqueContagemCabecalho.Count;
                ControlarNavegacao();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }