Ejemplo n.º 1
0
        private void btnWebeGonder_Click(object sender, EventArgs e)
        {
            try
            {
                HemelAlServis.hemenalserviceSoapClient a = new HemelAlServis.hemenalserviceSoapClient();
                if (a.Auth(frmKullaniciGiris.HemenAl_Auth_Code, frmKullaniciGiris.HemenAl_username, frmKullaniciGiris.HemenAl_password) == "False")
                {
                    XtraMessageBox.Show("HemenAl Entegrasyon Bilgileri Doğrulanamadı.\n İşlem İptal Edilecek.", "Ares", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    this.Close();
                }
                trGenel = SqlConnections.GetBaglanti().BeginTransaction();

                for (int i = 0; i < gvStokMarka.DataRowCount; i++)
                {
                    a.SetMarka(gvStokMarka.GetRowCellValue(i, "StokMarka").ToString(), gvStokMarka.GetRowCellValue(i, "StokMarka").ToString());
                }
                trGenel.Commit();
                XtraMessageBox.Show("Kaydetme Başarılı.", "Ares", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception hata)
            {
                trGenel.Rollback();
                frmHataBildir frmHataBildir = new frmHataBildir(hata.Message, hata.StackTrace);
                frmHataBildir.ShowDialog();
            }
        }
Ejemplo n.º 2
0
        private void frmHAKategori_Load(object sender, EventArgs e)
        {
            try
            {
                if (frmKullaniciGiris.HemenAl_Auth_Code == "")
                {
                    XtraMessageBox.Show("HemenAl Entegrasyon Bilgileri Eksik.\n İşlem İptal Edilecek.", "Ares", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    this.Close();
                }
                trGenel   = SqlConnections.GetBaglanti().BeginTransaction();
                stokMarka = new clsTablolar.Stok.csStokMarka(SqlConnections.GetBaglanti(), trGenel, -1);

                dtStokMarka.Clear();
                dtStokMarka            = stokMarka.StokMarkaDoldur(SqlConnections.GetBaglanti(), trGenel);
                gcStokMarka.DataSource = dtStokMarka;

                gvStokMarka.Columns["StokMarkaID"].Visible = false;
                gvStokMarka.Columns["StokMarka"].Caption   = "Stok Marka";
                gvStokMarka.Columns["StokMarka"].Width     = gcStokMarka.Width - 25;
                trGenel.Commit();

                HemelAlServis.hemenalserviceSoapClient a = new HemelAlServis.hemenalserviceSoapClient();
                if (a.Auth(frmKullaniciGiris.HemenAl_Auth_Code, frmKullaniciGiris.HemenAl_username, frmKullaniciGiris.HemenAl_password) == "False")
                {
                    XtraMessageBox.Show("HemenAl Entegrasyon Bilgileri Doğrulanamadı.\n İşlem İptal Edilecek.", "Ares", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    this.Close();
                }

                XmlDocument GelenTumveri = new XmlDocument();
                GelenTumveri.LoadXml(a.GetMarka().ToString());
                XmlReader xmlReader = new XmlNodeReader(GelenTumveri);
                DataSet   dsGelen   = new DataSet();
                dtHemenAlStokMarka.Clear();
                dsGelen.ReadXml(xmlReader);
                if (dsGelen.Tables.Count == 0)
                {
                    XtraMessageBox.Show("Siteden bilgiler okunamadı.");
                    //this.Close();
                }
                else
                {
                    dtHemenAlStokMarka   = dsGelen.Tables[0];
                    gcHAMarka.DataSource = dtHemenAlStokMarka;
                }
            }
            catch (Exception hata)
            {
                frmHataBildir frmHataBildir = new frmHataBildir(hata.Message, hata.StackTrace);
                frmHataBildir.ShowDialog();
            }
        }