コード例 #1
0
        public void UpdateStatus(ParkingLotUpdateViewModel model)
        {
            var entity = this.BaseService.Get(model.Id);

            if (entity != null)
            {
                entity.Status = model.Status;
                this.BaseService.Update(entity);
            }
        }
コード例 #2
0
        public void UpdateName(ParkingLotUpdateViewModel model)
        {
            var entity = this.BaseService.Get(model.Id);

            if (entity != null)
            {
                entity.Name = model.Name;
                this.BaseService.Update(entity);
            }
        }
コード例 #3
0
 public IHttpActionResult UpdateName(ParkingLotUpdateViewModel model)
 {
     try
     {
         var parkingLotApi = new ParkingLotApi();
         parkingLotApi.UpdateName(model);
         return(Json(new ResultModel
         {
             success = true,
         }));
     }
     catch (Exception ex)
     {
         return(Json(new ResultModel
         {
             success = false,
         }));
     }
 }
コード例 #4
0
 public IHttpActionResult UpdateStatus(ParkingLotUpdateViewModel model)
 {
     try
     {
         var parkingLotApi = new ParkingLotApi();
         parkingLotApi.UpdateStatus(model);
         return(Json(new ResultModel
         {
             message = "Cập nhập thành công",
             success = true,
         }));
     }
     catch (Exception ex)
     {
         return(Json(new ResultModel
         {
             message = "Có lỗi xảy ra, vui lòng liên hệ admin",
             success = false,
         }));
     }
 }