public ActionResult XoaNhatKy(int NhaXeId, int CustomerId, int XeXuatBenId, int NhatKyId, string apiToken) { //kiem tra xac thuc string _checkauthentication = isAuthentication(NhaXeId, CustomerId, apiToken, XeXuatBenId); if (!String.IsNullOrEmpty(_checkauthentication)) { return(ErrorOccured(_checkauthentication)); } var item = _nhaxeService.GetHistoryXeXuatBenLogById(NhatKyId); if (item.NguoiTaoId != currentCustomer.Id) { return(ErrorOccured("Nhật ký không được phép xóa")); } _nhaxeService.DeleteHistoryXeXuatBenLog(item); return(SuccessfulSimple("OK")); }