Esempio n. 1
0
        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"));
            }
        }
Esempio n. 2
0
        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"));
            }
        }