Example #1
0
        private void frmStokGruplari_Load(object sender, EventArgs e)
        {
            Guplar = new clsTablolar.Stok.csStokGrup();
            treeList1.DataSource = Guplar.StokGrupDoldur(SqlConnections.GetBaglanti(), TrGenel);

            treeList1.ParentFieldName = "UstGrupID";

            treeList1.KeyFieldName = "StokGrupID";
            if (AcmaSekli == NasilAcsin.AramaIcin)
            {
                btnDeleteItem.Visibility             = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                btnKaydetitem.Visibility             = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                btnAltGrupEkleItem.Visibility        = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                treeList1.OptionsView.ShowCheckBoxes = true;
                treeList1.OptionsBehavior.Editable   = false;
            }
            else // düzenleme için
            {
                btnTamamItem.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            }
            treeList1.ExpandAll();
            if (SeciliStokGruplari != null && SeciliStokGruplari.Count > 0)
            {
                foreach (var item in SeciliStokGruplari)
                {
                    treeList1.FindNodeByKeyID(item.StokGrupID).Checked = true;
                }
            }
        }
Example #2
0
        private void frmTopluStokGuncelleme_Load(object sender, EventArgs e)
        {
            if (Liste.gcStokListesi.MainView == Liste.gvStokListesi)
            {
                if (Liste.gvStokListesi.SelectedRowsCount < 2)
                {
                    XtraMessageBox.Show("çoklu seçim ile en az 2 öğe seçilmeli");
                    this.Close();
                }
                else
                {
                    labelControl1.Text = Liste.gvStokListesi.SelectedRowsCount + " adet Stok Güncellenecek";
                }
            }
            else
            {
                if (Liste.layoutView1.SelectedRowsCount < 2)
                {
                    XtraMessageBox.Show("çoklu seçim ile en az 2 öğe seçilmeli");
                    this.Close();
                }
                else

                {
                    labelControl1.Text = Liste.layoutView1.SelectedRowsCount + " adet Stok Güncellenecek";
                }
            }


            Trgenel  = SqlConnections.GetBaglanti().BeginTransaction();
            StokGrup = new clsTablolar.Stok.csStokGrup(SqlConnections.GetBaglanti(), Trgenel, -1);
            lkpGrubu.Properties.DataSource = StokGrup.StokGrupDoldur(SqlConnections.GetBaglanti(), Trgenel);



            lkpGrubu.Properties.DisplayMember = "StokGrupAdi";
            lkpGrubu.Properties.ValueMember   = "StokGrupID";


            clsTablolar.HemenAl.csHemenAlKategori kategori = new clsTablolar.HemenAl.csHemenAlKategori();
            kategori.KategoriGetir(SqlConnections.GetBaglanti(), Trgenel);
            lkpWebKategori.Properties.DataSource    = kategori.dt_Kategoriler;
            lkpWebKategori.Properties.ValueMember   = "HemanAlKategoriID";
            lkpWebKategori.Properties.DisplayMember = "KategoriAdi";


            clsTablolar.HemenAl.csEticaretDurumTanimlari stokdurumu = new clsTablolar.HemenAl.csEticaretDurumTanimlari();
            stokdurumu.Getir(SqlConnections.GetBaglanti(), Trgenel);
            lkpEticaretStoktaVarsaDurumTanimi.Properties.DataSource    = stokdurumu.dt;
            lkpEticaretStoktaVarsaDurumTanimi.Properties.DisplayMember = "Aciklama";
            lkpEticaretStoktaVarsaDurumTanimi.Properties.ValueMember   = "ID";

            lkpEticaretStoktaYoksaDurumTanimi.Properties.DataSource    = stokdurumu.dt;
            lkpEticaretStoktaYoksaDurumTanimi.Properties.DisplayMember = "Aciklama";
            lkpEticaretStoktaYoksaDurumTanimi.Properties.ValueMember   = "ID";


            Trgenel.Commit();
        }
        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();
                stokGrup    = new clsTablolar.Stok.csStokGrup(SqlConnections.GetBaglanti(), trGenel, -1);
                stokAraGrup = new clsTablolar.Stok.csStokAraGrup(SqlConnections.GetBaglanti(), trGenel, -1);
                dtStokGrup.Clear();
                dtStokGrup            = stokGrup.StokGrupDoldur(SqlConnections.GetBaglanti(), trGenel);
                gcStokGrup.DataSource = dtStokGrup;

                gvStokGrup.Columns["StokGrupID"].Visible  = false;
                gvStokGrup.Columns["StokGrupAdi"].Caption = "Stok Grup Adı";
                gvStokGrup.Columns["StokGrupAdi"].Width   = gcStokGrup.Width - 25;
                trGenel.Commit();


                HemenAlServis.hemenalserviceSoapClient a = new HemenAlServis.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.GetUrun().ToString());
                XmlReader xmlReader = new XmlNodeReader(GelenTumveri);
                DataSet   dsGelen   = new DataSet();
                dtHemenAlStokGrup.Clear();
                dsGelen.ReadXml(xmlReader);
                if (dsGelen.Tables.Count == 0)
                {
                    XtraMessageBox.Show("Siteden bilgiler okunamadı.");
                    //this.Close();
                }
                else
                {
                    dtHemenAlStokGrup       = dsGelen.Tables[0];
                    gcHAKategori.DataSource = dtHemenAlStokGrup;
                }
            }
            catch (Exception hata)
            {
                frmHataBildir frmHataBildir = new frmHataBildir(hata.Message, hata.StackTrace);
                frmHataBildir.ShowDialog();
            }
        }
Example #4
0
 void gruplariYukle()
 {
     using (clsTablolar.Stok.csStokGrup StokGrup = new clsTablolar.Stok.csStokGrup(SqlConnections.GetBaglanti(), TrGenel, -1))
     {
         TrGenel = SqlConnections.GetBaglanti().BeginTransaction();
         lkpGrup.Properties.DataSource    = StokGrup.StokGrupDoldur(SqlConnections.GetBaglanti(), TrGenel);
         lkpGrup.Properties.DisplayMember = "StokGrupAdi";
         lkpGrup.Properties.ValueMember   = "StokGrupID";
         TrGenel.Commit();
     }
     AraGrupGetir((int)lkpGrup.EditValue);
     AltGrubu = new clsTablolar.Stok.csStokAltGrup();
     AltGrupGetir((int)lkpAraGrup.EditValue);
 }
        void StokGrupYukle()
        {
            TrGenel  = SqlConnections.GetBaglanti().BeginTransaction();
            StokGrup = new clsTablolar.Stok.csStokGrup(SqlConnections.GetBaglanti(), TrGenel, -1);
            lkpStokGrup.Properties.DataSource = StokGrup.StokGrupDoldur(SqlConnections.GetBaglanti(), TrGenel);
            TrGenel.Commit();
            lkpStokGrup.Properties.DisplayMember = "StokGrupAdi";
            lkpStokGrup.Properties.ValueMember   = "StokGrupID";

            TrGenel  = SqlConnections.GetBaglanti().BeginTransaction();
            StokGrup = new clsTablolar.Stok.csStokGrup(SqlConnections.GetBaglanti(), TrGenel, -1);
            lkpHammaddeStokGrubu.Properties.DataSource    = StokGrup.StokGrupDoldur(SqlConnections.GetBaglanti(), TrGenel);
            lkpHammaddeStokGrubu.Properties.DisplayMember = "StokGrupAdi";
            lkpHammaddeStokGrubu.Properties.ValueMember   = "StokGrupID";
            TrGenel.Commit();
        }
        private void btnIceriBilgiAl_Click(object sender, EventArgs e)
        {
            #region StokGrup TABLOSUNA KAYIT EKLENİYOR.
            trGenel = SqlConnections.GetBaglanti().BeginTransaction();
            clsTablolar.Stok.csStokGrup StokGrup = new clsTablolar.Stok.csStokGrup(SqlConnections.GetBaglanti(), trGenel, -1);
            foreach (DataRow row in dtHemenAlStokGrup.AsEnumerable())
            {
                if (row["ustKategoriID"].ToString() == "0")
                {
                    StokGrup.StokGrupAdi = row["KategoriAdi"].ToString();
                    StokGrup.StokGrupID  = -1;
                    StokGrup.KaydedenID  = Convert.ToInt32(frmKullaniciGiris.KullaniciID);
                    StokGrup.KayitTarihi = DateTime.Now;
                    StokGrup.StokGrupKAydet(SqlConnections.GetBaglanti(), trGenel);
                }
            }
            trGenel.Commit();
            trGenel.Dispose();

            #endregion

            #region STOKGRUP LARI DEĞİŞKENE AKTARILIYOR.
            Dictionary <string, Int32> KategoriListesi = new Dictionary <string, int>();
            foreach (DataRow row in dtHemenAlStokGrup.AsEnumerable())
            {
                if (row["ustKategoriID"].ToString() == "0")
                {
                    KategoriListesi.Add(row["KategoriAdi"].ToString(), Convert.ToInt32(row["id"].ToString()));
                }
            }
            #endregion

            trGenel = SqlConnections.GetBaglanti().BeginTransaction();
            clsTablolar.Stok.csStokAraGrup StokAraGrup = new clsTablolar.Stok.csStokAraGrup(SqlConnections.GetBaglanti(), trGenel, -1);

            foreach (DataRow row in dtHemenAlStokGrup.AsEnumerable())
            {
                #region StokAraGrup TABLOSUNA KAYIT EKLENİYOR.
                if (row["ustKategoriID"].ToString() != "0")
                {
                    StokAraGrup.StokAraGrupID = -1;
                    StokAraGrup.StokGrupID    = -1;
                    string StokGrup_ = "";

                    foreach (KeyValuePair <string, Int32> item in KategoriListesi)
                    {
                        if (row["ustKategoriID"].ToString() == item.Value.ToString())
                        {
                            StokGrup_ = item.Key;
                            break;
                        }
                    }

                    StokAraGrup.StokGrupAdi    = StokGrup_;
                    StokAraGrup.StokAraGrupAdi = row["KategoriAdi"].ToString();
                    StokAraGrup.KaydedenID     = Convert.ToInt32(frmKullaniciGiris.KullaniciID);
                    StokAraGrup.KayitTarihi    = DateTime.Now;
                    StokAraGrup.StokAraGrupKaydetHemenAl(SqlConnections.GetBaglanti(), trGenel);
                }
                #endregion
            }

            dtStokGrup.Clear();
            dtStokGrup            = stokGrup.StokGrupDoldur(SqlConnections.GetBaglanti(), trGenel);
            gcStokGrup.DataSource = dtStokGrup;

            trGenel.Commit();
        }
        private void frmStokListesi_Load(object sender, EventArgs e)
        {
            try
            {
                layoutControlItem43.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;

                trGenel  = SqlConnections.GetBaglanti().BeginTransaction();
                Grubu    = new clsTablolar.Stok.csStokGrup(SqlConnections.GetBaglanti(), trGenel, -1);
                AraGrubu = new clsTablolar.Stok.csStokAraGrup(SqlConnections.GetBaglanti(), trGenel, -1);
                //StokArama = new clsTablolar.Stok.csStokArama();

                FiltreKriterleriniBindleHamisina();

                //barkodoku.BarkoduOku();

                txtStokAdi.Focus();
                trGenel.Commit();
                HemenAlKategoriYukle();

                clsTablolar.HemenAl.csHemenAlUrunDurum HemenAlUrunDurumu = new clsTablolar.HemenAl.csHemenAlUrunDurum();
                lkpHemanAlDurum.Properties.DataSource    = HemenAlUrunDurumu.Dt_UrunDurumlari;
                lkpHemanAlDurum.Properties.DisplayMember = "DurumAdi";
                lkpHemanAlDurum.Properties.ValueMember   = "DurumKodu";



                clsTablolar.csEnumDanDtVer enumdanVerHamisina = new csEnumDanDtVer();

                lookUpEdit1.Properties.DataSource    = enumdanVerHamisina.ToDataTable(typeof(clsTablolar.Stok.csStokArama.enumFotoOzellikleri));
                lookUpEdit1.Properties.DisplayMember = "name";
                lookUpEdit1.Properties.ValueMember   = "value";

                lookUpEdit1.EditValue = 1;
                //lookUpEdit1.Properties.PopulateColumns();

                //lookUpEdit1.Properties.Columns[1].Visible = false;
                clsTablolar.Stok.csStokSayimGrubu SayimGrubu = new clsTablolar.Stok.csStokSayimGrubu();
                lkpStokSayimGrubu.Properties.DataSource = SayimGrubu.SayimGrubuGetir(SqlConnections.GetBaglanti(), trGenel);

                lkpStokSayimGrubu.Properties.DisplayMember = "SayimAdi";
                lkpStokSayimGrubu.Properties.ValueMember   = "StokSayimGrubuID";

                //checkedListBox_FiyatTanimlari.Text = clsTablolar.Ayarlar.csAyarlar.StokListeFiyatTanimlari;

                panelControl1.Select();
                panelControl1.Focus();
                panelControl1.Select();

                //layoutControlGroup5.tabp
                //xtraTabPage1.Focus();
                //xtraTabPage1.Select();

                txtStokAdi.SelectAll();
                txtStokAdi.Focus();
                txtStokAdi.Select();
                secilenKontrol = txtStokAdi;
            }
            catch (Exception hata)
            {
                trGenel.Rollback();
                frmHataBildir frmHataBildir = new frmHataBildir(hata.Message, hata.StackTrace);
                frmHataBildir.ShowDialog();
            }
            //txtStokKodu.FindForm();
            txtStokAdi.Focus();
        }