public ActionResult BaoXianListProvide(BaoXianDTO baoDanDTO) { if (!base.HasPermission("BaoXian", PermissionOperate.manager)) { return(null); } int isAll = 1; if (!base.HasPermission("BaoXianAll", PermissionOperate.manager)) { baoDanDTO.MpUserId = base.LoginAdmin.MpUserId.HasValue ? base.LoginAdmin.MpUserId : Guid.Empty; isAll = 0; } OceanDynamicList <object> list = _baodanService.GetPageDynamicList(PageIndex, PageSize, baoDanDTO, isAll); if (list != null) { return(Content(list.ToJson(), "text/javascript")); } else { return(Content("{\"rows\":[],\"total\":0}", "text/javascript")); } }
public ActionResult DrivingLicenseListProvide(DrivingLicenseDTO drivingLicenseDTO) { if (!base.HasPermission("DrivingLicense", PermissionOperate.manager)) { return(null); } int isAll = 1; if (!base.HasPermission("DrivingLicenseAll", PermissionOperate.manager)) { drivingLicenseDTO.MpUserId = base.LoginAdmin.MpUserId; isAll = 0; } OceanDynamicList <object> list = _drivingLicenseService.GetPageDynamicList(PageIndex, PageSize, drivingLicenseDTO, isAll); if (list != null) { return(Content(list.ToJson(), "text/javascript")); } else { return(Content("{\"rows\":[],\"total\":0}", "text/javascript")); } }
public ActionResult PosListProvide(PosApply posApplyDTO) { if (!base.HasPermission("PosApply", PermissionOperate.manager)) { return(null); } OceanDynamicList <object> list = _posApplyService.GetPageList(PageIndex, PageSize, posApplyDTO) ?? new OceanDynamicList <object>(); return(Content(list.ToJson(), "text/javascript")); }
public ActionResult PluginList() { OceanDynamicList <object> list = _pluginBaseService.GetPluginList(PageIndex, 15, new Guid(RQuery["cid", Guid.Empty.ToString()])); XmlDocument xmlDoc = new XmlDocument(); DateTime now = DateTime.Now; DateTime startDate = DateTime.Now.AddDays(-1); DateTime endDate = DateTime.Now.AddDays(1); foreach (dynamic item in list) { item.IsOpen = 1; if (item == null || string.IsNullOrWhiteSpace(item.Value.ToString())) { continue; } string value = item.Value; xmlDoc.LoadXml(value); XmlNode node = xmlDoc.SelectSingleNode("plugin/Cst_Plugin_StartDate"); if (node != null && node.HasChildNodes) { if (!string.IsNullOrWhiteSpace(node.InnerText)) { startDate = TypeConverter.StrToDateTime(node.InnerText, DateTime.Now).AddDays(-1); } } node = xmlDoc.SelectSingleNode("plugin/Cst_Plugin_EndDate"); if (node != null && node.HasChildNodes) { if (!string.IsNullOrWhiteSpace(node.InnerText)) { endDate = TypeConverter.StrToDateTime(node.InnerText, DateTime.Now).AddDays(1); } } item.StartDate = startDate; item.EndDate = endDate; if (now < startDate) { item.IsOpen = 2; } else if (now > endDate) { item.IsOpen = 0; } } return(Content(list.ToJson(), "text/javascript")); }
public ActionResult ComplainListProvide(ComplainDTO complainDTO) { if (!base.HasPermission("Complain", PermissionOperate.manager)) { return(null); } OceanDynamicList <object> list = _complainService.GetPageDynamicList(PageIndex, PageSize, complainDTO); if (list != null) { return(Content(list.ToJson(), "text/javascript")); } else { return(Content("{\"rows\":[],\"total\":0}", "text/javascript")); } }
public ActionResult PosListProvide() { if (!base.HasPermission("Pos", PermissionOperate.manager)) { return(null); } Pos posDTO = new Pos() { }; TryUpdateModel <Pos>(posDTO); OceanDynamicList <object> list = _posService.GetPageDynamicList(PageIndex, PageSize, posDTO); if (list != null) { return(Content(list.ToJson(), "text/javascript")); } else { return(Content("{\"rows\":[],\"total\":0}", "text/javascript")); } }
public ActionResult ComplainListProvide(ComplainDTO complainDTO) { MpUserID = new Guid("E8325C13-9C76-4B70-911E-57395A2F4D69"); MpUser mpUser = _mpUserService.GetById(MpUserID); if (mpUser == null || mpUser.IsAuth != 1) { return(Json(new { message = "您没有权限,请先申请成为业务员!" })); } complainDTO.MpUserId = MpUserID; //IList<VehicleLicense> vehicleList = _vehicleLicenseService.GetList("from VehicleLicense where MpUserId = '" + mpUser.Id + "'"); OceanDynamicList <object> complainList = _complainService.GetPageDynamicList(PageIndex, PageSize, complainDTO, 0); //ViewBag.VehicleList = new JavaScriptSerializer().Serialize(Json(vehicleList).Data); //Json(vehicleList, JsonRequestBehavior.AllowGet); //return View(vehicleList); if (complainList != null) { return(Content(complainList.ToJson(), "text/javascript")); } else { return(Content("{\"rows\":[],\"total\":0}", "text/javascript")); } }