public ActionResult ChuyenTrangThaiXe(int NhaXeId, int CustomerId, int XeXuatBenId, int TrangThaiId, string apiToken) { //kiem tra xac thuc string _checkauthentication = isAuthentication(NhaXeId, CustomerId, apiToken, XeXuatBenId); if (!String.IsNullOrEmpty(_checkauthentication)) { return(ErrorOccured(_checkauthentication)); } xexuatben.TrangThai = (ENTrangThaiXeXuatBen)TrangThaiId; _nhaxeService.UpdateHistoryXeXuatBen(xexuatben); switch (xexuatben.TrangThai) { case ENTrangThaiXeXuatBen.DANG_DI: { CreateHistoryXeXuatBenLog(xexuatben.TrangThai, "Xe xuất bến, bắt đầu hành trình", XeXuatBenId, currentNhanVien.Id); break; } case ENTrangThaiXeXuatBen.KET_THUC: { CreateHistoryXeXuatBenLog(xexuatben.TrangThai, "Xe vào bến, kết thúc hành trình", XeXuatBenId, currentNhanVien.Id); break; } } return(SuccessfulSimple("OK")); }