Example #1
0
 private void btnSirketKaydet_Click(object sender, EventArgs e)
 {
     SirketService.Sirket sirket = new SirketService.Sirket()
     {
         sehir       = txtSirketSehir.Text,
         adres       = txtSirketAdres.Text,
         sirketAdi   = txtSirketAdi.Text,
         sirketPuani = 0
     };
     using (var sirketSoapClient = new SirketWebServiceSoapClient())
     {
         sirketSoapClient.InsertSirket(sirket);
         MessageBox.Show("Şirket Başarıyla Eklendi");
     }
 }
Example #2
0
 private bool InsertSirket(string sirketAdi, string sehir, string adres)
 {
     try
     {
         using (var sirketSoapClient = new SirketWebServiceSoapClient()) {
             return(sirketSoapClient.InsertSirket(new SirketService.Sirket()
             {
                 sirketAdi = sirketAdi,
                 sirketPuani = 0,
                 sehir = sehir,
                 adres = adres
             }));
         }
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("Customer doesn't exists.");
     }
 }