Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

177
Vistas
How to hide some parts in .Net 4.7?

I'm working at a property management website. There are sold properties that i don't want to show to the users. What should I do with it? Should I make changes in the controller or the view?

This is my Sold properties controller code.

public ActionResult ViewSoldProperties()
    {
        ViewBag.Principles = db.UCDs.GetUCDs(UCLTypes.PropertyStatus).AsUcdSelectList();

        var propertiesViewAll = db.Properties.Where(x => x.IsDeleted == false && x.Status == 2353).OrderByDescending(i => i.ID);
        var ucds = db.UCDs.AsNoTracking().ActiveOnly().ToList();
        foreach (var i in propertiesViewAll)
        {
            i.StatusName = ucds.Where(x => x.ID == i.Status).Select(t => t.Title).FirstOrDefault();

            i.FinancingName = ucds.Where(x => x.ID == i.Financing).Select(t => t.Title).FirstOrDefault();

            System.Net.Http.HttpClient client = new System.Net.Http.HttpClient();

            client.BaseAddress = new Uri("http://gis.hcpafl.org/propertysearch/#/search/basic/address=" + i.StreetAddress + " " + i.RouteAddress + ", " + i.City);
            //Address2 is used as base address
            i.Address2 = client.BaseAddress.ToString();
            var compId = db.BuyingInfoes.Where(x => x.PropertyID == i.ID).Select(x => x.CompanyID).FirstOrDefault();
            if (compId != null)
            {
                var compAbbr = db.Owners.Where(x => x.ID == compId).Select(x => x.CompanyAbbreviation).FirstOrDefault();
                if (compAbbr != null)
                {
                    i.OwnerAbbriviation = compAbbr;
                }
            }
        }
        ViewBag.data = propertiesViewAll;
        //if (NumberOfRecords != null)
        //{
        //    return PartialView("PartialViewAll");
        //}
        return View();

Below are the images I want to hide from the customers on the live website.

These are the example images I don't want to show to the users

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda