public ActionResult FactorByLinea() { FactorCanalBLL bll = new FactorCanalBLL(); var factorLinea = db.factor_canal_linea.ToList(); var lineas = db.linea_negocio.Where(m => m.ACTIVO).ToList(); var lista_linea = bll.ListLineaNegocioDTO(lineas, factorLinea); return(Json(lista_linea, JsonRequestBehavior.AllowGet)); }
public JsonResult GetByIdLinea(int idLinea) { FactorCanalBLL bll = new FactorCanalBLL(); var factorLinea = db.factor_canal_linea.FirstOrDefault(m => m.ID_LINEA_NEGOCIO == idLinea); var linea = db.linea_negocio.FirstOrDefault(m => m.ID == idLinea); var result = bll.LineaNegocioDTO(linea, factorLinea); return(Json(result, JsonRequestBehavior.AllowGet)); }