public ActionResult UserType(SMIM_UserType_ST userType)
 {
     try
     {
         string strMessage = "";
         bool   _success   = false;
         if (userType.UserTypeId > 0)
         {
             int maxValue = dbUser.UpdateUserType(userType);
             if (maxValue > 0)
             {
                 strMessage = "Record successfully updated.";
                 _success   = true;
             }
             else
             {
                 strMessage = "Application server error.";
             }
         }
         else
         {
             int maxValue = dbUser.InsertUserType(userType);
             userType.UserTypeId = maxValue;
             if (maxValue > 0)
             {
                 strMessage = "Record successfully saved.";
                 _success   = true;
             }
             else
             {
                 strMessage = "Application server error.";
             }
         }
         return(Json(new { success = _success, response = strMessage }));
     }
     catch (Exception ex)
     {
         Log.LogWrite(ex.Message, "User Type Insert/Edit", ex);
         return(Json(new { success = false, response = ex.Message.ToString() }));
     }
 }