public string GetCarTypeList(string TypeMode, string DeptId) { UserInfo user = new UserInfo(); user = (UserInfo)Session["LoginUser"]; if (user != null) { DeptInfo di = deptInfoBll.GetDeptInfo(user.EnterId); CarTypeList ct = new CarTypeList(); if (DeptId != null && DeptId.Trim() != "") { ct.Businessdivisionid = DeptId; } else { ct.Businessdivisioncode = di.Businessdivisioncode; } IList <CarTypeList> ictlist = carTypeBll.GetCarTypeList(ct); if (TypeMode == "true") { CarTypeList c = new CarTypeList(); c.TypeId = ""; c.TypeName = "--选择车辆类型--"; ictlist.Insert(0, c); } string json = ConvertToJson(ictlist); return(json); } else { return(""); } }
public override Result VisitCartype_head(RateGrammarParser.Cartype_headContext context) { if (context.CARTYPE() != null) { string carType = context.CARTYPE().GetText(); rule.CarType = carType; CarTypeList.Add(carType); } return null; }
private IList <CarTypeList> RefreshCache(string deptid) { UserInfo user = new UserInfo(); user = (UserInfo)Session["LoginUser"]; IList <CarTypeList> ictlist = null; string cache_name = "CurUserCarTypeList_" + user.EnterId; CarTypeList ct = new CarTypeList(); ct.Businessdivisionid = deptid; ictlist = carTypeBll.GetCarTypeList(ct); CacheHelper.Remove(cache_name); CacheHelper.Insert(cache_name, ictlist, 365 * 24 * 60); return(ictlist); }