本文整理汇总了C#中WMS.CustomClass.QueryBuilder.QueryForShiftForLinq方法的典型用法代码示例。如果您正苦于以下问题:C# QueryBuilder.QueryForShiftForLinq方法的具体用法?C# QueryBuilder.QueryForShiftForLinq怎么用?C# QueryBuilder.QueryForShiftForLinq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMS.CustomClass.QueryBuilder
的用法示例。
在下文中一共展示了QueryBuilder.QueryForShiftForLinq方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShiftList
public ActionResult ShiftList()
{
QueryBuilder qb = new QueryBuilder();
User LoggedInUser = Session["LoggedUser"] as User;
qb.QueryForShiftForLinq(LoggedInUser);
//var type;
//if (HttpContext.Request.IsAjaxRequest())
// return Json(new SelectList(
// types.ToArray(),
// "ShiftID",
// "ShiftName")
// , JsonRequestBehavior.AllowGet);
return RedirectToAction("Index");
}
示例2: BindGridViewShift
private void BindGridViewShift(string search)
{
FiltersModel fm = Session["FiltersModel"] as FiltersModel;
List<Shift> _View = new List<Shift>();
List<Shift> _TempView = new List<Shift>();
User LoggedInUser = HttpContext.Current.Session["LoggedUser"] as User;
QueryBuilder qb = new QueryBuilder();
string query = qb.QueryForShiftForLinq(LoggedInUser);
// DataTable dt = qb.GetValuesfromDB("select * from Shift " + query);
_View = da.Shifts.Where(query).AsQueryable().OrderBy("ShiftName ASC").ToList();
if (fm.LocationFilter.Count > 0)
{
foreach (var loc in fm.LocationFilter)
{
short _locID = Convert.ToInt16(loc.ID);
_TempView.AddRange(_View.Where(aa => aa.LocationID == _locID).ToList());
}
_View = _TempView.ToList();
}
GridViewShift.DataSource = _View.Where(aa => aa.ShiftName.ToUpper().Contains(search.ToUpper())).ToList();
GridViewShift.DataBind();
}