Exemple #1
0
        public LoteRemessaCnab240 AdicionarLote(HeaderLoteRemessaCnab240 headerLote, TrailerLoteRemessaCnab240 trailerLote)
        {
            var loteAdd = new LoteRemessaCnab240();

            loteAdd.HeaderLote  = headerLote;
            loteAdd.TrailerLote = trailerLote;

            Lotes.Add(loteAdd);
            return(loteAdd);
        }
Exemple #2
0
        public void setLoteActive(object parameter)
        {
            MessageBoxResult result = MessageBox.Show("Cambiar Estado a Activo?", "Cambiar Estado", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
            {
                InventoryQueries.SetLoteSalidaActive(SelectedInactive.CodLote);

                Lotes.Add(SelectedInactive);
                LotesInactive.Remove(SelectedInactive);
            }
        }
Exemple #3
0
        /**
         * @fn  public resultAgregarLote agregarLote(Lote pLote)
         *
         * @brief   Validador al momento de agregar un lote al sistema.
         *
         * @author  WINMACROS
         * @date    17/07/2017
         *
         * @param   pLote   Lote a validar.
         *
         * @return  Resultado de validacion.
         */

        public resultAgregarLote agregarLote(Lote pLote)
        {
            tolls             t   = tolls.T;
            resultAgregarLote ret = resultAgregarLote.agrego;

            Lote.tipoLote tipoLoteXNom = t.tipoLoteXNombreArchivo(pLote.Exc.Direccion);
            bool          excel        = pLote.Exc.validarExcel();

            if (!excel)
            {
                ret = resultAgregarLote.excelDeficiente;
            }
            else if (pLote.Exc.Direccion.Extencion != ".csv")
            {
                ret = resultAgregarLote.errorEnExtencion;
            }
            else if (tipoLoteXNom == Lote.tipoLote.errorCampana)
            {
                ret = resultAgregarLote.nombreMalEscrito;
            }
            else if (tipoLoteXNom != pLote.LoteTipo)
            {
                ret = resultAgregarLote.nombreDistintoCampana;
            }
            else if (pLote.Nombre.Length > 32)
            {
                ret = resultAgregarLote.nombreLargo;
            }
            else if (!pLote.asignarMarcador())
            {
                ret = resultAgregarLote.noExisteCampanaSistema;
            }
            else if (existeLote(pLote))
            {
                ret = resultAgregarLote.elLoteYaExiste;
            }
            else
            {
                Lotes.Add(pLote);
            }
            accionesCodigo("Se intenta cargar el lote:" + pLote.ToString() + " Al sistema. ", ret.ToString());
            return(ret);
        }
Exemple #4
0
        public ActionResult Index(int?AnimalId, AnimalMessageId?message, bool?ApresentaBusca)
        {
            ViewBag.StatusMessage =
                message == AnimalMessageId.AddSuccess ? "Animal adicionado com sucesso."
                    : message == AnimalMessageId.DisableSucess ? "Animal desabilitado com sucesso."
                    : message == AnimalMessageId.Error ? "Ocorreu um erro durante a operação. Tente novamente mais tarde."
                    : "";

            if (ApresentaBusca.HasValue && ApresentaBusca.Value)
            {
                ViewBag.ApresentaBusca = true;
            }
            else
            {
                ViewBag.ApresentaBusca = false;
                ViewBag.AnimalExiste   = AnimalId.HasValue && AnimalId.Value > 0;
                if (ViewBag.AnimalExiste)
                {
                    return(View(Animal.Get(AnimalId.Value)));
                }
                else
                {
                    Lotes lotes            = Lotes.List(Helpers.Current.FazendaId);
                    Lotes lotesDisponiveis = new Lotes();
                    foreach (Lote l in lotes)
                    {
                        if (LoteController._QtdMaxAnimais > Lote.GetQtnAnimais(l.Id))
                        {
                            lotesDisponiveis.Add(l);
                        }
                    }
                    ViewBag.LotesDisponiveis = lotesDisponiveis;
                }
            }
            return(View());
        }
Exemple #5
0
 public virtual void AgregarLote(Lote lote)
 {
     lote.NoEsNull(nameof(lote));
     lote.Inventario = this;
     Lotes.Add(lote);
 }
Exemple #6
0
 public void Add(Lote item)
 {
     Lotes.Add(item);
 }
Exemple #7
0
 private void LotesAddExecute()
 {
     Lotes.Add(new IngresoPorLote());
 }