Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            System.Net.CredentialCache myCredentials = new System.Net.CredentialCache();
            NetworkCredential netCred = new NetworkCredential(TxtUsername.Text, TxtPass.Text);

            VerifySer.UrunDogrulamaReceiverService servis = new VerifySer.UrunDogrulamaReceiverService();
            VerifySer.UrunDogrulamaBildirimType giris = new VerifySer.UrunDogrulamaBildirimType();
            VerifySer.UrunDogrulamaBildirimCevapType cikis = new VerifySer.UrunDogrulamaBildirimCevapType();
            servis.Url = "http://its.saglik.gov.tr/UrunDogrulama/UrunDogrulamaReceiverService";
            myCredentials.Add(new Uri(servis.Url), "Basic", netCred);
            servis.Credentials = myCredentials;

            giris.DT = "V";
            giris.FR = TxtGln.Text;

            VerifySer.UrunDogrulamaBildirimTypeURUN URUN = new VerifySer.UrunDogrulamaBildirimTypeURUN();

            VerifySer.UrunDogrulamaBildirimTypeURUN[] URUNS = (VerifySer.UrunDogrulamaBildirimTypeURUN[])Array.CreateInstance(typeof(VerifySer.UrunDogrulamaBildirimTypeURUN), tablo.Rows.Count);

            for (int i = 0; i < tablo.Rows.Count; i++)
            {
                URUN.GTIN = "0" + tablo.Rows[i].Field<string>("GTIN");
                URUN.BN = tablo.Rows[i].Field<string>("BN");
                string trh = String.Format("{0:yyyy-MM-dd}", tablo.Rows[i].Field<DateTime>("XD"));
                URUN.XD = Convert.ToDateTime(trh);
                URUN.SN = tablo.Rows[i].Field<string>("SN"); ;
                URUNS[i] = URUN;

            }
            giris.URUNLER = URUNS;

               cikis = servis.UrunDogrulamaBildir(giris);

            TxtBildid.Text = cikis.BILDIRIMID;
            TxtUyariKodu.Text = cikis.URUNLER[0].UC;
        }
Example #2
0
 /// <remarks/>
 public void UrunDogrulamaBildirAsync(UrunDogrulamaBildirimType UrunDogrulamaBildirim, object userState) {
     if ((this.UrunDogrulamaBildirOperationCompleted == null)) {
         this.UrunDogrulamaBildirOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUrunDogrulamaBildirOperationCompleted);
     }
     this.InvokeAsync("UrunDogrulamaBildir", new object[] {
                 UrunDogrulamaBildirim}, this.UrunDogrulamaBildirOperationCompleted, userState);
 }
Example #3
0
 /// <remarks/>
 public void UrunDogrulamaBildirAsync(UrunDogrulamaBildirimType UrunDogrulamaBildirim) {
     this.UrunDogrulamaBildirAsync(UrunDogrulamaBildirim, null);
 }