void Getir()
        {
            try
            {
                Siparis.SiparisDurumTanimID = new int[checkedListBoxControl1.CheckedItems.Count];
                for (int i = 0; i < checkedListBoxControl1.CheckedItems.Count; i++)
                {
                    Siparis.SiparisDurumTanimID[i] = (int)checkedListBoxControl1.CheckedItems[i];
                }



                Siparis.MuhasebelenmeDrumu    = new object[1];
                Siparis.MuhasebelenmeDrumu[0] = radioGroup1.EditValue;
                gvSiparis.FocusedRowChanged  -= gvSiparis_FocusedRowChanged;
                TrGenel = Baglanti.BeginTransaction();
                Siparis.SiparisAraListe(Baglanti, TrGenel);
                TrGenel.Commit();
            }
            catch (Exception)
            {
                try
                {
                    TrGenel.Rollback();
                }
                catch (Exception) { }
                throw;
            }
            finally
            {
                gvSiparis.FocusedRowChanged += gvSiparis_FocusedRowChanged;
                gvSiparis_FocusedRowChanged(null, null);
            }
        }
예제 #2
0
        void AlinanSiparisleri()
        {
            if (SiparisArama.SiparisteDegisiklikVarMi(SqlConnections.GetBaglanti(), AlinanSiparisSonDegisiklikZamani))
            {
                SiparisArama.HizliSatistaGozukecekMi = 1;

                //SiparisArama.MuhasebelenmeDrumu = new object[1] { 4 };
                SiparisArama.SiparisDurumTanimID = new Int32[1] {
                    2
                };
                SiparisArama.HazirlanmisSiparislerdenSonUcGünüdeGetir = true;

                gcAlinanSiparisler.DataSource = SiparisArama.SiparisAraListe(SqlConnections.GetBaglanti(), TrGenel);

                //SiparisArama.dt_SiparisListesi.Select("DuzenlemeTarihi = MAX(DuzenlemeTarihi)");

                var last = SiparisArama.dt_SiparisListesi.AsEnumerable()
                           .Select(cols => cols.Field <DateTime>(SiparisArama.dt_SiparisListesi.Columns["DuzenlemeTarihi"]))
                           .OrderByDescending(p => p.Ticks)
                           .FirstOrDefault();

                AlinanSiparisSonDegisiklikZamani = last;
            }
        }
예제 #3
0
        private void btnFiltrele_Click(object sender, EventArgs e)
        {
            try
            {
                SiparisArama.SiparisDurumTanimID = new int[checkedListBoxControl1.CheckedItems.Count];
                for (int i = 0; i < checkedListBoxControl1.CheckedItems.Count; i++)
                {
                    SiparisArama.SiparisDurumTanimID[i] = (int)checkedListBoxControl1.CheckedItems[i]
                    ;
                }
                SiparisArama.MuhasebelenmeDrumu = checkedListBox_Muhasebelenme.Items.GetCheckedValues().ToArray();

                switch (cmbHizliSatis.SelectedIndex)
                {
                case 1:
                    SiparisArama.HizliSatistaGozukecekMi = 1;
                    break;

                case 2:
                    SiparisArama.HizliSatistaGozukecekMi = 0;
                    break;

                default:
                    SiparisArama.HizliSatistaGozukecekMi = -1;
                    break;
                }
                //SiparisArama.HizliSatistaGozukecekMi

                dtSiparis            = SiparisArama.SiparisAraListe(SqlConnections.GetBaglanti(), trGenel);
                gcSiparis.DataSource = dtSiparis;
                //GridArayuzIslemleri(enGridArayuzIslemleri.Get);
            }
            catch (Exception ex)
            {
            }
        }