Exemplo n.º 1
0
 public IActionResult AddHotelChainEmail([FromBody]Hotelchainemail data)
 {
     if (isEmployee())
     {
         Boolean insertResult = addHotelChainEmail(data.Hcid, data.Email);
         if (insertResult)
         {
             return Json("Success");
         }
         else
         {
             return Json("Error: Could not add the email");
         }
     }
     else
     {
         return RedirectToAction("AccessDenied", "Account");
     }
 }
Exemplo n.º 2
0
        public IActionResult DeleteHotelChainEmail([FromBody]Hotelchainemail data)
        {
            if (isEmployee())
            {
                if (deleteHotelChainEmail(data.Hcid, data.Email))
                {
                    return Json("Success");
                }
                else
                {
                    return Json("Error: Could not delete the email");
                }
            }
            else
            {
                return RedirectToAction("AccessDenied", "Account");
            }

        }