public ClasificacionCorp(ClasificacionCorp c) { this.Incentivos = c.Incentivos; this.SPABase = c.SPABase; this.SPAProgramacionInventario = c.SPAProgramacionInventario; this.Text = c.Text; }
public JsonResult GetDealersAndClasifCorp() { List<Dealer> tempColl = ListDealers(); List<ClasificacionCorp> modelos = ListClasif(); modelos.ForEach(el => el.Incentivos = new ProgramaConceptos { DescuentoSobreBase = "2.0%", PlazoComercial = "90 días" }); List<ClasificacionCorp> modelosDealer = new List<ClasificacionCorp>(); //hack foreach (var m in modelos) { foreach (var d in tempColl) { Dealer dd = new Dealer { GFX = d.GFX, Descripcion = d.Descripcion }; ClasificacionCorp mm = new ClasificacionCorp(m); mm.DealerAsociado = dd; modelosDealer.Add(mm); } } Hashtable result = new Hashtable(); result["Rows"] = modelosDealer; return this.Json(result, JsonRequestBehavior.AllowGet); }