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