public JsonResult Delete(BookRecords entity)
 {
     OperateStatus status;
     bookRecordsModel.Delete(entity.Id, out status);
     return JsonForStatus(status);
 }
 public JsonResult RecordsUpdate(BookRecords entity)
 {
     OperateStatus status;
     bookRecordsModel.Update(entity, out status);
     return JsonForStatus(status);
 }
 public JsonResult Update(BookRecords entity)
 {
     OperateStatus status;
     entity.DateModified = DateTime.Now;
     entity.Modifier = "管理员";
     bookRecordsModel.Update(entity, out status);
     return JsonForStatus(status);
 }
        public JsonResult RecordsCreateOrUpdate(BookRecords entity)
        {
            OperateStatus status;
            if (entity.Id != null && entity.Id != Guid.Empty)
            {
                entity.OperateComputerIP = this.Request.UserHostAddress;
                entity.DateModified = DateTime.Now;

                bookRecordsModel.Update(entity, out status);
            }
            else
            {
                entity.OperateComputerIP = this.Request.UserHostAddress;
                entity.DateCreated = DateTime.Now;

                bookRecordsModel.Create(entity, out status);
            }
            return JsonForStatus(status);
        }