/// <summary> /// 删除车辆 /// </summary> /// <param name="sVelchileCode"></param> /// <returns></returns> public ActionResult DeleteCarOper(string sVelchileCode) { DBProcessResult dbResult = new VehicleManagerWCFService().DeleteCar(sVelchileCode); return Json(new { result = dbResult.IsSuccess ? 1 : 0, data = dbResult.Message }); }
public JsonResult Relation(string tenantCode, string licenceNumber, string gpsType, string gpsCode, string SIM, string vehicleType, string expireTime) { EMVehicle entity = new EMVehicle(); entity.DeviceNo = gpsCode; entity.ExpireTime = expireTime.ToDateTimeNull(); entity.GPSTypeID = gpsType.ToULong(); entity.GroupID = ulong.MaxValue; entity.IconType = (EnumVehicleType)(vehicleType.ToInt()); //entity.UserName = SessionUserInfo.UserName; entity.TenantCode = tenantCode; entity.SIMNo = SIM; entity.VehicleCode = Guid.NewGuid(); entity.LicenceNumber = licenceNumber; entity.IsStop = false; entity.CreateTime = DateTime.Now; entity.InstallTime = DateTime.Now; //DBProcessResult bl = _SysSettingService.AddVehicle(view); DBProcessResult<int> res = new VehicleManagerWCFService().AddVehicleOperateTran(entity, SessionUserInfo.UserName); return Json(new { IsSuccess = res.IsSuccess, Message = res.Message,addCount=res.ReturnValue }, null, Encoding.UTF8, JsonRequestBehavior.AllowGet); }
public JsonResult GetNewCarList(string tenantCode, string LicenceNumber, string SIMNo, string DeviceNo, int rows, int pageSize) { //代码优化 int iRowCount; int pageIndex = (rows - 1) * pageSize; List<VehicleManager> vlist = new List<VehicleManager>(); VehicleManagerWCFService vbll = new VehicleManagerWCFService(); vlist = vbll.GetCarList(tenantCode, LicenceNumber, SIMNo, DeviceNo, pageIndex, pageSize, out iRowCount); PagedDataList<VehicleManager> list = new PagedDataList<VehicleManager>(vlist, iRowCount); return Json(list, JsonRequestBehavior.AllowGet); }