public ActionResult GetUserStores([DataSourceRequest] DataSourceRequest request, int?userId) { var list = new WebStoreGridDTO[0]; if (userId == null) { return(Json(list.ToDataSourceResult(request), JsonRequestBehavior.AllowGet)); } list = _webStoreServices.GetOwnerStores((int)userId).OrderBy(x => x.AddOn).ThenBy(x => x.Name).ToArray(); return(Json(list.ToDataSourceResult(request), JsonRequestBehavior.AllowGet)); }
public ActionResult GetUserStores([DataSourceRequest] DataSourceRequest request, int id) { var list = _webStoreServices.GetOwnerStores(id).OrderBy(x => x.AddOn).ThenBy(x => x.Name).ToArray(); return(Json(list.ToDataSourceResult(request), JsonRequestBehavior.AllowGet)); }
private BaseListDTO[] GetAuthorSotresLOV() { return(_webStoreServices.GetOwnerStores(CurrentUserId).Select(x => new BaseListDTO { id = x.StoreId, name = x.Name }).Union(_webStoreServices.GetUserAffiliateStoresLOV(CurrentUserId)).ToArray()); }