예제 #1
0
        public override Page SearchPaged(int offset, int itemsPerPage)
        {
            Page page = new Page();
            List <List <object> > items = null;

            items = this.SearchPagedPublicacionesParaCompra(offset, itemsPerPage);


            EmpresaService empresaService = new EmpresaService();
            GradoService   gradoService   = new GradoService();
            RubroService   rubroService   = new RubroService();

            foreach (List <object> row in items)
            {
                Publicacion publicacion = new Publicacion();
                publicacion.Codigo           = (int)row[0];
                publicacion.FechaPublicacion = (DateTime)row[1];
                publicacion.Descripcion      = (string)row[2];
                publicacion.Rubro            = rubroService.GetRubro((int)row[3]);
                publicacion.Direccion        = (row[4].GetType() != typeof(DBNull)) ? (string)row[4] : "Indeterminado";
                publicacion.Grado            = (row[5].GetType() != typeof(DBNull)) ? gradoService.GetGrado((int)row[5]) : null;
                publicacion.Empresa          = empresaService.GetEmpresa((int)row[6]);
                publicacion.Estado           = EstadoFactory.getEstado((string)row[7]);
                publicacion.FechaEventoId    = (int)row[15];
                publicacion.FechaEvento      = (DateTime)row[17];
                page.TotalItems = (int)row[18];
                page.AddItem(publicacion);
            }

            return(page);
        }
 public AltaProovedorForm(Proovedor proveedor, CiudadService ciudadService, RubroService rubroService, DireccionService direccionService, ProveedorService proveedorService)
 {
     this.proveedor        = proveedor;
     this.rubroService     = rubroService;
     this.ciudadService    = ciudadService;
     this.direccionService = direccionService;
     this.proveedorService = proveedorService;
     InitializeComponent();
     cargarComboRubro();
     llenarComboCiudad();
     cargarPantalla();
 }
예제 #3
0
        public Compra()
        {
            InitializeComponent();
            agregarCategoria.BackgroundImage = Properties.Resources.plus_icon;
            quitarCategoria.BackgroundImage  = Properties.Resources.minus_icon;
            fechaInicioVista.Value           = Utils.Utilities.getCurrentDate();
            fechaFinVista.Value = Utils.Utilities.getCurrentDate();
            RubroService rubroService = new RubroService();

            categoriasComboBox.DataSource = rubroService.getAllRubros();
            categoriasVista.Text          = "";
            System.Drawing.Size size = new System.Drawing.Size(1100, 500);
            this.Size = size;
        }
        private void GetRubros()
        {
            RubroService rubroService = (RubroService)ServiceFactory.GetService("Rubro");

            this.rubro.Items.AddRange(rubroService.getAllRubros().ToArray());
        }