예제 #1
0
 public static Contractor GetByPhone(string phone)
 {
     using (ContractorServiceClient client = new ContractorServiceClient())
     {
         return(new Contractor(client.GetContractorByPhone(phone)));
     }
 }
예제 #2
0
 public static Contractor GetById(int id)
 {
     using (ContractorServiceClient client = new ContractorServiceClient())
     {
         return(new Contractor(client.GetContractorById(id)));
     }
 }
예제 #3
0
 public static Contractor GetByName(string name)
 {
     using (ContractorServiceClient client = new ContractorServiceClient())
     {
         return(new Contractor(client.GetContractorByName(name)));
     }
 }
예제 #4
0
 public Contractor()
 {
     using (ContractorServiceClient client = new ContractorServiceClient())
     {
         Proxy = client.CreateContractor();
         client.Close();
     }
 }