本文整理汇总了C#中Telerik.Web.Mvc.GridCommand类的典型用法代码示例。如果您正苦于以下问题:C# GridCommand类的具体用法?C# GridCommand怎么用?C# GridCommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GridCommand类属于Telerik.Web.Mvc命名空间,在下文中一共展示了GridCommand类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: BulkEditSave
public ActionResult BulkEditSave(GridCommand command,
[Bind(Prefix = "updated")]IEnumerable<PluginModel> updatedPlugins)
{
if (!_permissionService.Authorize(StandardPermissionProvider.ManagePlugins))
return AccessDeniedView();
//bool changed = false;
if (updatedPlugins != null)
{
foreach (var pluginModel in updatedPlugins)
{
//update
var pluginDescriptor = _pluginFinder.GetPluginDescriptorBySystemName(pluginModel.SystemName, false);
if (pluginDescriptor != null)
{
//we allow editing of 'friendly name' and 'display order'
pluginDescriptor.FriendlyName = pluginModel.FriendlyName;
pluginDescriptor.DisplayOrder = pluginModel.DisplayOrder;
PluginFileParser.SavePluginDescriptionFile(pluginDescriptor);
//changed = true;
}
}
}
//if (changed)
//restart application
//_webHelper.RestartAppDomain("~/Admin/Plugin/List");
return BulkEditSelect(command);
}
开发者ID:pquic,项目名称:qCommerce,代码行数:30,代码来源:PluginController.cs
示例2: _AjaxList
public ActionResult _AjaxList(GridCommand command, WorkingCalendarSearchModel searchModel)
{
var objList = this.genericMgr.FindAllWithNativeSql<object[]>("exec USP_Busi_GetWorkingCalendarView ?,?,?,?",
new object[]
{
searchModel.SearchRegion, "",
searchModel.StartWorkingDate, searchModel.EndWorkingDate
});
var list = new List<WorkingCalendarView>();
foreach (var obj in objList)
{
var w = obj as object[];
if (w == null) continue;
list.Add(new WorkingCalendarView
{
Date = (DateTime)w[0],
DateFrom = (DateTime)w[1],
DateTo = (DateTime)w[2]
});
}
return PartialView(new GridModel(list));
}
开发者ID:Novthirteen,项目名称:sih-les,代码行数:25,代码来源:ProdLineWorkingCalendarReportController.cs
示例3: Configure
public ActionResult Configure(GridCommand command)
{
if (!_permissionService.Authorize(StandardPermissionProvider.ManageTaxSettings))
return Content("Access denied");
var tmp = new List<FixedTaxRateModel>();
foreach (var taxCategory in _taxCategoryService.GetAllTaxCategories())
tmp.Add(new FixedTaxRateModel()
{
TaxCategoryId = taxCategory.Id,
TaxCategoryName = taxCategory.Name,
Rate = GetTaxRate(taxCategory.Id)
});
var tmp2 = tmp.ForCommand(command);
var gridModel = new GridModel<FixedTaxRateModel>
{
Data = tmp2,
Total = tmp2.Count()
};
return new JsonResult
{
Data = gridModel
};
}
开发者ID:vic0626,项目名称:nas-merk,代码行数:25,代码来源:TaxFixedRateController.cs
示例4: List
public ActionResult List(GridCommand command)
{
if (!_permissionService.Authorize(StandardPermissionProvider.ManageCustomers))
return AccessDeniedView();
var customers = _customerService.GetOnlineCustomers(DateTime.UtcNow.AddMinutes(-_customerSettings.OnlineCustomerMinutes),
null, command.Page - 1, command.PageSize);
var model = new GridModel<OnlineCustomerModel>
{
Data = customers.Select(x =>
{
return new OnlineCustomerModel()
{
Id = x.Id,
CustomerInfo = x.IsRegistered() ? x.Email : _localizationService.GetResource("Admin.Customers.Guest"),
LastIpAddress = x.LastIpAddress,
Location = _geoCountryLookup.LookupCountryName(x.LastIpAddress),
LastActivityDate = _dateTimeHelper.ConvertToUserTime(x.LastActivityDateUtc, DateTimeKind.Utc),
LastVisitedPage = x.GetAttribute<string>(SystemCustomerAttributeNames.LastVisitedPage)
};
}),
Total = customers.TotalCount
};
return new JsonResult
{
Data = model
};
}
开发者ID:vic0626,项目名称:nas-merk,代码行数:28,代码来源:OnlineCustomerController.cs
示例5: RoutingMasterList
public ActionResult RoutingMasterList(GridCommand command, RoutingMasterSearchModel searchModel)
{
SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
return View();
}
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:7,代码来源:RoutingController.cs
示例6: AffiliatedCustomerList
public ActionResult AffiliatedCustomerList(int affiliateId, GridCommand command)
{
if (!_permissionService.Authorize(StandardPermissionProvider.ManageAffiliates))
return AccessDeniedView();
var affiliate = _affiliateService.GetAffiliateById(affiliateId);
if (affiliate == null)
throw new ArgumentException("No affiliate found with the specified id");
var customers = _customerService.GetAllCustomers(
affiliateId: affiliate.Id,
pageIndex: command.Page - 1,
pageSize: command.PageSize);
var model = new GridModel<AffiliateModel.AffiliatedCustomerModel>
{
Data = customers.Select(customer =>
{
var customerModel = new AffiliateModel.AffiliatedCustomerModel();
customerModel.Id = customer.Id;
customerModel.Name = customer.Email;
return customerModel;
}),
Total = customers.TotalCount
};
return new JsonResult
{
Data = model
};
}
开发者ID:emretiryaki,项目名称:paymill-nopcommerce,代码行数:30,代码来源:AffiliateController.cs
示例7: Configure
public ActionResult Configure(GridCommand command)
{
if (!_permissionService.Authorize(StandardPermissionProvider.ManageShippingSettings))
return Content("Access denied");
var tmp = new List<FixedShippingRateModel>();
foreach (var shippingMethod in _shippingService.GetAllShippingMethods())
tmp.Add(new FixedShippingRateModel()
{
ShippingMethodId = shippingMethod.Id,
ShippingMethodName = shippingMethod.Name,
Rate = GetShippingRate(shippingMethod.Id)
});
var tmp2 = tmp.ForCommand(command);
var gridModel = new GridModel<FixedShippingRateModel>
{
Data = tmp2,
Total = tmp2.Count()
};
return new JsonResult
{
Data = gridModel
};
}
开发者ID:nguyentu1982,项目名称:quancu,代码行数:25,代码来源:ShippingFixedRateController.cs
示例8: _SearchResult
public ActionResult _SearchResult(GridCommand command, string item, string supplier, DateTime? dateFrom, DateTime? dateTo)
{
string sqlStr = PrepareSearchStatement(command, item, supplier, dateFrom, dateTo);
IList<object[]> objectList = this.queryMgr.FindAllWithNativeSql<object[]>(sqlStr);
var inspectDetailList = (from inp in objectList
select new InspectDetail
{
IpNo = (string)inp[0],
ManufactureParty = (string)inp[1],
ManufacturePartyName = (string)inp[2],
Item = (string)inp[3],
ItemDescription = (string)inp[4],
ReferenceItemCode = (string)inp[5],
UnitCount = (decimal)inp[6],
Uom = (string)inp[7],
RejectQty = (decimal)inp[8],
InspectQty = (decimal)inp[9]
}).ToList();
int count = Convert.ToInt32(base.systemMgr.GetEntityPreferenceValue(EntityPreference.CodeEnum.MaxRowSizeOnPage));
if (inspectDetailList.Count > count)
{
SaveWarningMessage(string.Format(Resources.EXT.ControllerLan.Con_DataExceedRowTheSpecifiedRows, count));
}
return View(inspectDetailList.Take(count));
}
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:27,代码来源:PPMController.cs
示例9: _ReturnHierarchyAjax
public ActionResult _ReturnHierarchyAjax(GridCommand command, string item, string supplier, DateTime? dateFrom, DateTime? dateTo)
{
string sqlStr = PrepareReturnSearchStatement(command, item, supplier, dateFrom, dateTo);
IList<object[]> objectList = this.queryMgr.FindAllWithNativeSql<object[]>(sqlStr);
var receiveReturnList = (from rr in objectList
select new ReceiveReturnModel
{
Supplier = (string)rr[0],
Item = (string)rr[1],
ReceivedQty = rr[2] == null ? 0 : (decimal)rr[2],
RejectedQty = rr[3] == null ? 0 : (decimal)rr[3],
ItemDescription = (string)rr[4],
ReferenceItemCode = (string)rr[5],
Uom = (string)rr[6],
SupplierName = (string)rr[7]
}).ToList();
int count = Convert.ToInt32(base.systemMgr.GetEntityPreferenceValue(EntityPreference.CodeEnum.MaxRowSizeOnPage));
if (receiveReturnList.Count > count)
{
SaveWarningMessage(string.Format(Resources.EXT.ControllerLan.Con_DataExceedRowTheSpecifiedRows, count));
}
return PartialView(new GridModel(receiveReturnList));
}
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:25,代码来源:PPMController.cs
示例10: _AjaxList
public ActionResult _AjaxList(GridCommand command, SearchModel searchModel)
{
SearchStatementModel searchStatementModel = PrepareSearchStatement(command, searchModel);
GridModel<PostDO> gridlist = GetAjaxPageData<PostDO>(searchStatementModel, command);
return PartialView(gridlist);
}
开发者ID:Novthirteen,项目名称:sih-les,代码行数:7,代码来源:PostDOController.cs
示例11: PrepareSearchStatement
private SearchStatementModel PrepareSearchStatement(GridCommand command, SearchModel searchModel)
{
string whereStatement = "";
IList<object> param = new List<object>();
HqlStatementHelper.AddEqStatement("OrderNo", searchModel.OrderNo, "t", ref whereStatement, param);
HqlStatementHelper.AddEqStatement("ReceiptNo", searchModel.ReceiptNo, "t", ref whereStatement, param);
HqlStatementHelper.AddEqStatement("Status", searchModel.Status, "t", ref whereStatement, param);
if (searchModel.StartDate != null & searchModel.EndDate != null)
{
HqlStatementHelper.AddBetweenStatement("CreateDate", searchModel.StartDate, searchModel.EndDate, "t", ref whereStatement, param);
}
else if (searchModel.StartDate != null & searchModel.EndDate == null)
{
HqlStatementHelper.AddGeStatement("CreateDate", searchModel.StartDate, "t", ref whereStatement, param);
}
else if (searchModel.StartDate == null & searchModel.EndDate != null)
{
HqlStatementHelper.AddLeStatement("CreateDate", searchModel.EndDate, "t", ref whereStatement, param);
}
string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
if (command.SortDescriptors.Count == 0)
{
sortingStatement = " order by t.CreateDate desc";
}
SearchStatementModel searchStatementModel = new SearchStatementModel();
searchStatementModel.SelectCountStatement = selectCountStatement;
searchStatementModel.SelectStatement = selectStatement;
searchStatementModel.WhereStatement = whereStatement;
searchStatementModel.SortingStatement = sortingStatement;
searchStatementModel.Parameters = param.ToArray<object>();
return searchStatementModel;
}
开发者ID:Novthirteen,项目名称:sih-les,代码行数:35,代码来源:PostDOController.cs
示例12: PrepareSearchStatement
private SearchNativeSqlStatementModel PrepareSearchStatement(GridCommand command, CabProductionViewSearchModel searchModel)
{
string statement = selectStatement;
if (!string.IsNullOrWhiteSpace(searchModel.Flow))
{
statement += string.Format(" and m.Flow = '{0}'", searchModel.Flow);
}
if (searchModel.Type != null)
{
statement += string.Format(" and m.Type = {0}", searchModel.Type);
}
if (searchModel.IsOut)
{
statement += " and exists(select 1 from ORD_OrderMstr_2 m2 where m2.OrderNo = m.ExtOrderNo)";
}
string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
if (string.IsNullOrEmpty(sortingStatement))
{
sortingStatement = " order by ExtSeq asc";
}
SearchNativeSqlStatementModel searchStatementModel = new SearchNativeSqlStatementModel();
searchStatementModel.SelectSql = statement;
searchStatementModel.SortingStatement = sortingStatement;
return searchStatementModel;
}
开发者ID:Novthirteen,项目名称:sih-les,代码行数:29,代码来源:VehicleProductionSubLineController.cs
示例13: TaxRateUpdate
public ActionResult TaxRateUpdate(FixedTaxRateModel model, GridCommand command)
{
int taxCategoryId = model.TaxCategoryId;
decimal rate = model.Rate;
_settingService.SetSetting(string.Format("Tax.TaxProvider.FixedRate.TaxCategoryId{0}", taxCategoryId), rate);
var tmp = new List<FixedTaxRateModel>();
foreach (var taxCategory in _taxCategoryService.GetAllTaxCategories())
tmp.Add(new FixedTaxRateModel()
{
TaxCategoryId = taxCategory.Id,
TaxCategoryName = taxCategory.Name,
Rate = GetTaxRate(taxCategory.Id)
});
var tmp2 = tmp.ForCommand(command);
var gridModel = new GridModel<FixedTaxRateModel>
{
Data = tmp2,
Total = tmp2.Count()
};
return new JsonResult
{
Data = gridModel
};
}
开发者ID:boatengfrankenstein,项目名称:SmartStoreNET,代码行数:27,代码来源:TaxFixedRateController.cs
示例14: _SearchResult
public ActionResult _SearchResult(GridCommand command, string item, string supplier, DateTime? dateFrom, DateTime? dateTo)
{
string sqlStr = PrepareSearchStatement(command, item, supplier, dateFrom, dateTo);
IList<object[]> objectList = base.genericMgr.FindAllWithNativeSql<object[]>(sqlStr);
var inspectDetailList = (from inp in objectList
select new InspectDetail
{
IpNo = (string)inp[0],
ManufactureParty = (string)inp[1],
ManufacturePartyName = (string)inp[2],
Item = (string)inp[3],
ItemDescription = (string)inp[4],
ReferenceItemCode = (string)inp[5],
UnitCount = (decimal)inp[6],
Uom = (string)inp[7],
RejectQty = (decimal)inp[8],
InspectQty = (decimal)inp[9]
}).ToList();
int count = Convert.ToInt32(base.systemMgr.GetEntityPreferenceValue(EntityPreference.CodeEnum.MaxRowSizeOnPage));
if (inspectDetailList.Count > count)
{
SaveWarningMessage(string.Format("数据超过{0}行,只显示前{0}行", count));
}
//return PartialView(inspectDetailList.Take(count));
GridModel<InspectDetail> gridModel = new GridModel<InspectDetail>();
gridModel.Total = count;
gridModel.Data = inspectDetailList.Take(count);
return PartialView(gridModel);
}
开发者ID:Novthirteen,项目名称:sih-les,代码行数:31,代码来源:PPMController.cs
示例15: Categories
public ActionResult Categories(GridCommand command)
{
var model = new GridModel<TaxCategoryModel>();
if (_permissionService.Authorize(StandardPermissionProvider.ManageTaxSettings))
{
var categoriesModel = _taxCategoryService.GetAllTaxCategories()
.Select(x => x.ToModel())
.ForCommand(command)
.ToList();
model.Data = categoriesModel;
model.Total = categoriesModel.Count;
}
else
{
model.Data = Enumerable.Empty<TaxCategoryModel>();
NotifyAccessDenied();
}
return new JsonResult
{
Data = model
};
}
开发者ID:toannguyen241994,项目名称:SmartStoreNET,代码行数:26,代码来源:TaxController.cs
示例16: CurrentCarts
public ActionResult CurrentCarts(GridCommand command)
{
if (!_permissionService.Authorize(StandardPermissionProvider.ManageCurrentCarts))
return AccessDeniedView();
var customers = _customerService.GetAllCustomers(
loadOnlyWithShoppingCart: true,
sct: ShoppingCartType.ShoppingCart,
pageIndex: command.Page - 1,
pageSize: command.PageSize);
var gridModel = new GridModel<ShoppingCartModel>
{
Data = customers.Select(x =>
{
return new ShoppingCartModel()
{
CustomerId = x.Id,
CustomerEmail = x.IsRegistered() ? x.Email : _localizationService.GetResource("Admin.Customers.Guest"),
TotalItems = x.ShoppingCartItems.Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart).ToList().GetTotalProducts()
};
}),
Total = customers.TotalCount
};
return new JsonResult
{
Data = gridModel
};
}
开发者ID:vic0626,项目名称:nas-merk,代码行数:29,代码来源:ShoppingCartController.cs
示例17: List
public ActionResult List(GridCommand command, OrderSeqSearchModel searchModel)
{
SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
var error = false;
if (string.IsNullOrWhiteSpace(searchModel.ProdLine))
{
error = true;
SaveWarningMessage(Resources.ErrorMessage.Errors_Common_FieldRequired, Resources.ORD.OrderMaster.OrderMaster_Flow);
}
if (!string.IsNullOrWhiteSpace(searchModel.TraceCode) && !error)
{
if (base.genericMgr.FindAll<long>("select count(*) from OrderSeq as s where s.TraceCode = ? and s.ProductLine=? ", new object[] { searchModel.TraceCode, searchModel.ProdLine })[0] == 0)
{
error = true;
SaveErrorMessage("Van号值加生产线找不到对应的数据。");
}
}
if (error)
{
ViewBag.ReadOnly = true;
return View();
}
ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
return View();
}
开发者ID:Novthirteen,项目名称:sih-les,代码行数:27,代码来源:OrderSeqController.cs
示例18: List
public ActionResult List(GridCommand command, string Flow)
{
ViewBag.Flow = Flow;
this.CheckFlow(Flow, true);
ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
return View();
}
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:7,代码来源:DeferredFeedCounterController.cs
示例19: List
public ActionResult List(GridCommand command, IssueNoSearchModel searchModel)
{
var search = this.ProcessSearchModel(command, searchModel);
//TempData["IssueNoSearchModel"] = searchModel;
ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
return View();
}
开发者ID:Novthirteen,项目名称:sih-les,代码行数:7,代码来源:IssueNoController.cs
示例20: List
public ActionResult List(GridCommand command, LocationLotDetailSearchModel searchModel)
{
SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
if (string.IsNullOrEmpty(searchModel.Location))
{
SaveWarningMessage(Resources.EXT.ControllerLan.Con_LocationCanNotBeEmpty);
return View();
}
if (string.IsNullOrEmpty(searchModel.LotNoFrom))
{
SaveWarningMessage(Resources.EXT.ControllerLan.Con_FirstBatchNumberCanNotBeEmpty);
return View();
}
if (string.IsNullOrEmpty(searchModel.LotNoFrom) && !string.IsNullOrEmpty(searchModel.LotNoTo))
{
SaveWarningMessage(Resources.EXT.ControllerLan.Con_FirstBatchNumberBeEmptyCanNotInputSecondBatchNumber);
return View();
}
if (!string.IsNullOrEmpty(searchModel.Location)&&!string.IsNullOrEmpty(searchModel.LotNoFrom))
{
ViewBag.Region = searchModel.Region;
TempData["_AjaxMessage"] = "";
}
else
{
SaveWarningMessage(Resources.EXT.ControllerLan.Con_SearchConditionNeedLocationAndBatchNo);
}
return View();
}
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:33,代码来源:AuditInspectionController.cs
注:本文中的Telerik.Web.Mvc.GridCommand类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论