示例#1
0
 public static bool isExist(string appId, string appName, string exclusion, out string state)
 {
     try
     {
         state = string.Empty;
         var result = ComponentDb.GetByAppIdAndAppName(appId, appName, exclusion);
         if (result == null)
         {
             return(false);
         }
         else
         {
             if (result.AppName.ToLower().Trim().Equals(appName.ToLower().Trim()))
             {
                 state = "App Name";
             }
             else if (result.AppID == appId)
             {
                 state = "App ID";
             }
             return(true);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }