Example #1
0
        public void BindZona(IAutoBindeable autoBindeable)
        {
            autoBindeable.ClearItems();
            AddDefaultItems(autoBindeable);

            var idEmpresa   = autoBindeable.ParentSelected <Empresa>();
            var idLinea     = autoBindeable.ParentSelected <Linea>();
            var idsTipoZona = autoBindeable.ParentSelectedValues <TipoZona>();

            var zonas = DaoFactory.ZonaDAO.GetList(new[] { idEmpresa }, new[] { idLinea }, idsTipoZona).OrderBy(z => z.Descripcion);

            foreach (var zona in zonas)
            {
                autoBindeable.AddItem(zona.Descripcion, zona.Id);
            }
        }