Example #1
0
 public string found_in_all(ClientsList clientsList, BuildingsList buildingsList, string control_word)
 {
     result += clientsList.FindN(control_word);
     if (clientsList.FindN(control_word) == null)
     {
         result += clientsList.FindSn(control_word);
     }
     if (clientsList.FindSn(control_word) == null)
     {
         result += clientsList.FindM(Convert.ToInt16(control_word));
     }
     if (clientsList.FindM(Convert.ToInt16(control_word)) == null)
     {
         result += clientsList.FindBa(control_word);
     }
     if (clientsList.FindBa(control_word) == null)
     {
         result += buildingsList.FindAvaible(Convert.ToBoolean(control_word));
     }
     if (buildingsList.FindAvaible(Convert.ToBoolean(control_word)) == null)
     {
         result += buildingsList.FindCost(Convert.ToInt16(control_word));
     }
     if (buildingsList.FindCost(Convert.ToInt16(control_word)) == null)
     {
         result += buildingsList.FindType(control_word);
     }
     if (buildingsList.FindType(control_word) == null)
     {
         throw new Exception("Control word not found in list!");
     }
     return(result);
 }
Example #2
0
 public string found_client(ClientsList clientsList, string control_word)
 {
     result += clientsList.FindN(control_word);
     if (clientsList.FindN(control_word) == null)
     {
         result += clientsList.FindSn(control_word);
     }
     if (clientsList.FindSn(control_word) == null)
     {
         result += clientsList.FindM(Convert.ToInt16(control_word));
     }
     if (clientsList.FindM(Convert.ToInt16(control_word)) == null)
     {
         result += clientsList.FindBa(control_word);
     }
     if (clientsList.FindBa(control_word) == null)
     {
         throw new ClientException("Control word not found in list!");
     }
     return(result);
 }