public ActionResult DeleteUserType(int Code)
 {
     try
     {
         string strMessage = "";
         bool   _success   = false;
         var    userType   = dbUser.getUserTypebyId(Code);
         int    maxValue   = dbUser.DeleteUserType(userType);
         if (maxValue > 0)
         {
             strMessage = "Record successfully updated.";
             _success   = true;
         }
         else
         {
             strMessage = "Application server error.";
         }
         return(Json(new { success = _success, response = strMessage }));
     }
     catch (Exception ex)
     {
         Log.LogWrite(ex.Message, "User Type Delete", ex);
         return(Json(new { success = false, response = ex.Message.ToString() }));
     }
 }