public static void GetBloodGroups() { if (GlobalVariables.BloodGroups.IsNotNull()) { return; } BloodGroupSolClient client = Extensions.Extensions.GetBloodGroups(); GlobalVariables.BloodGroups = client.IsNull() ? null : client.BloodGroups(true).ToList(); }
public static BloodGroupSolClient GetBloodGroups() { BloodGroupSolClient client; try { client = new BloodGroupSolClient(binding, new EndpointAddress(String.Format(GlobalVariables.ServiceRoot + "/{0}", "BloodGroupService.svc"))); client.Select(-1); } catch (Exception) { bool b = Program.TestService(); if (!b) { Application.Exit(); } client = new BloodGroupSolClient(binding, new EndpointAddress(String.Format(GlobalVariables.ServiceRoot + "/{0}", "BloodGroupService.svc"))); } return(client); }