Example #1
0
 public JsonResult IsEmailAvailable(string newEmail)
 {
     using (RentItServiceClient proxy = new RentItServiceClient())
     {
         try
         {
             if (proxy.IsEmailAvailable(newEmail))
             {
                 return Json(true, JsonRequestBehavior.AllowGet);
             }
         }
         catch
         {
             return Json("Email is already in use.", JsonRequestBehavior.AllowGet);
         }
         return Json("Email is already in use.", JsonRequestBehavior.AllowGet);
     }
 }