Пример #1
0
 public IActionResult addServiceGarage([FromBody] tempService createService)
 {
     if (sh.addServiceGarage(createService.service, createService.garage))
     {
         return(Ok(sh.viewService(createService.garage.username)));
     }
     else
     {
         return(Ok(false));
     }
 }
Пример #2
0
 public IActionResult changePassword([FromBody] tempService customer)
 {
     if (ch.changePassWord(customer))
     {
         return(Ok(ch.Get(customer.username)));
     }
     else
     {
         return(Ok(false));
     }
 }
Пример #3
0
 public IActionResult changePassword([FromBody] tempService garage)
 {
     if (gh.changePassWord(garage))
     {
         return(Ok(gh.Get(garage.username)));
     }
     else
     {
         return(Ok(false));
     }
 }
Пример #4
0
 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));
     }
 }
Пример #6
0
        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));
        }
Пример #7
0
        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));
        }
Пример #8
0
        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));
        }
Пример #9
0
        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));
        }
Пример #10
0
 public bool removeService([FromBody] tempService updateService)
 => sh.removeServiceGarage(updateService.serviceId, updateService.garageId);