public void GetAllSubgroups()
 {
     using (FixedAssetsWebService.SubgroupServiceClient Client = new FixedAssetsWebService.SubgroupServiceClient())
     {
         Client.Open();
         object[] list = Client.GetAllSubgroups();
         foreach (Subgroup s in list)
         {
             subgroups.Add(s);
         }
     }
 }
 public static int GetIdByNameWebServiceMethod(string name)
 {
     using (FixedAssetsWebService.SubgroupServiceClient Client = new FixedAssetsWebService.SubgroupServiceClient())
     {
         Client.Open();
         Subgroup subgroup = Client.GetSubgroupByName(name);
         if (subgroup != null)
         {
             return subgroup.id;
         }
         else
         {
             return 0;
         }
     }
 }
 public static string GetNameByIdWebServiceMethod(int id, bool isShortName)
 {
     string name = string.Empty;
     using (FixedAssetsWebService.SubgroupServiceClient Client = new FixedAssetsWebService.SubgroupServiceClient())
     {
         Client.Open();
         Subgroup subgroup = Client.GetSubgroupById(id);
         if (subgroup != null)
         {
             if (isShortName)
             {
                 return subgroup.short_name;
             }
             else
             {
                 return subgroup.name;
             }
         }
         else
         {
             return string.Empty;
         }
     }
 }