예제 #1
0
 public IActionResult AddHotelChainPhone([FromBody]Hotelchainphone data)
 {
     if (isEmployee())
     {
         Boolean insertResult = addHotelChainPhone(data.Hcid, data.PhoneNumber);
         if (insertResult)
         {
             return Json("Success");
         }
         else
         {
             return Json("Error: Could not add the phone number");
         }
     }
     else
     {
         return RedirectToAction("AccessDenied", "Account");
     }
 }
예제 #2
0
        public IActionResult DeleteHotelChainPhone([FromBody]Hotelchainphone data)
        {
            if (isEmployee())
            {
                if (deleteHotelChainPhone(data.Hcid, data.PhoneNumber))
                {
                    return Json("Success");
                }
                else
                {
                    return Json("Error: Could not delete the phone number");
                }
            }
            else
            {
                return RedirectToAction("AccessDenied", "Account");
            }

        }