public IActionResult addServiceGarage([FromBody] tempService createService) { if (sh.addServiceGarage(createService.service, createService.garage)) { return(Ok(sh.viewService(createService.garage.username))); } else { return(Ok(false)); } }
public IActionResult changePassword([FromBody] tempService customer) { if (ch.changePassWord(customer)) { return(Ok(ch.Get(customer.username))); } else { return(Ok(false)); } }
public IActionResult changePassword([FromBody] tempService garage) { if (gh.changePassWord(garage)) { return(Ok(gh.Get(garage.username))); } else { return(Ok(false)); } }
public IActionResult changePassword([FromBody] tempService mechanic) { if (mh.changePassWord(mechanic)) { return(Ok(mh.Get(mechanic.username))); } else { return(Ok(false)); } }
public IActionResult changePassword([FromBody] tempService systemAdmin) { if (sah.changePassWord(systemAdmin)) { return(Ok(sah.Get(systemAdmin.username))); } else { return(Ok(false)); } }
public bool changePassWord(tempService customer) { var cust = Get(customer.username); if (cust.password == customer.oldpassword) { cust.password = customer.newpassword; } else { return(false); } return(customerRepository.Update(cust)); }
public bool changePassWord(tempService garage) { var gar = Get(garage.username); if (gar.password == garage.oldpassword) { gar.password = garage.newpassword; } else { return(false); } return(garageRepository.Update(gar)); }
public bool changePassWord(tempService sysAdmin) { var sys = Get(sysAdmin.username); if (sys.password == sysAdmin.oldpassword) { sys.password = sysAdmin.newpassword; } else { return(false); } return(sysAdminRepository.Update(sys)); }
public bool changePassWord(tempService mechanic) { var mech = Get(mechanic.username); if (mech.password == mechanic.oldpassword) { mech.password = mechanic.newpassword; } else { return(false); } return(mechanicRepository.Update(mech)); }
public bool removeService([FromBody] tempService updateService) => sh.removeServiceGarage(updateService.serviceId, updateService.garageId);