Exemplo n.º 1
0
 private void RefreshGrid()
 {
     grdMasaRaporu.SQLText = "SELECT AD.REC_ID " +
                             ", MASA_TANIMI " +
                             ",AD.CREATE_DATE AS ACILIS_ZAMANI " +
                             ", FAT.CREATE_DATE AS KAPANIS_ZAMANI " +
                             ", FAT.GENEL_TOPLAM AS TUTAR " +
                             ", CASE " +
                             "    WHEN(SELECT COUNT(*) FROM TBLKASAHAR WHERE UST_BELGE_TIPI = 'ft1' AND UST_BELGE_NO = FAT.BELGE_NO) > 0 " +
                             "        THEN(SELECT KASA_ADI FROM TBLKASA WHERE KASA_KODU = (SELECT KASA_KODU FROM TBLKASAHAR WHERE UST_BELGE_TIPI = 'ft1' AND UST_BELGE_NO = FAT.BELGE_NO))  " +
                             "	WHEN(SELECT COUNT(*) FROM TBLBANKAHAR WHERE UST_BELGE_TIPI = 'ft1' AND UST_BELGE_NO = FAT.BELGE_NO) > 0 "+
                             "        THEN(SELECT HESAP_ADI FROM TBLBANKA WHERE HESAP_KODU = (SELECT BANKA_KODU FROM TBLBANKAHAR WHERE UST_BELGE_TIPI = 'ft1' AND UST_BELGE_NO = FAT.BELGE_NO))  " +
                             "	ELSE '' "+
                             "    END AS ODEME_YERI " +
                             ", CASE " +
                             "    WHEN(SELECT COUNT(*) FROM TBLFATURA WHERE ADISYON_RECID = AD.REC_ID) > 1 THEN 'Kısmi Ödeme' " +
                             "    ELSE 'Tüm Ödeme' END AS ODEME_TIPI " +
                             "FROM[TBLBLUEADISYON] AD, TBLFATURA FAT, TBLBLUEMASA MASA " +
                             "WHERE FAT.ADISYON_RECID = AD.REC_ID " +
                             "AND MASA.REC_ID = AD.MASA_RECID " +
                             "AND AD.DURUM = 1 " +
                             "AND AD.CREATE_DATE >= '" + BAS_TAR.GetSQLDataStr() + " " + BAS_SAAT.Text + "' AND AD.CREATE_DATE <= '" + BIT_TAR.GetSQLDataStr() + " " + BIT_SAAT.Text + "' ";
     if (MASA_TANIMI.IsNotEmpty())
     {
         grdMasaRaporu.SQLText += "AND MASA.MASA_TANIMI = '" + MASA_TANIMI.GetDataStr() + "' ";
     }
     grdMasaRaporu.SQLText += "ORDER BY AD.TARIH";
     grdMasaRaporu.Open();
     dsRapor = grdMasaRaporu.gridDataSet;
 }
Exemplo n.º 2
0
        private void RefreshGrid()
        {
            grdIptalStok.SQLText = "SELECT MASA_TANIMI, IPTAL.STOK_ISIM AS STOK_ADI, IPTAL.MIKTAR, IPTAL.CREATE_DATE TARIH, IPTAL.ACIKLAMA, " +
                                   "ISNULL(IPTAL.BIRIM_FIYAT, 0) * ISNULL(IPTAL.MIKTAR, 0) AS TUTAR" +
                                   ", IPTAL.GARSON_ADI " +
                                   "FROM TBLBLUEADISYONIPTAL IPTAL, TBLBLUEADISYON AD, TBLBLUEMASA MASA " +
                                   "WHERE IPTAL.ADISYON_RECID = AD.REC_ID " +
                                   "AND AD.MASA_RECID = MASA.REC_ID " +
                                   "AND IPTAL.CREATE_DATE >= '" + BAS_TAR.GetSQLDataStr() + " " + BAS_SAAT.Text + "' AND IPTAL.CREATE_DATE <= '" + BIT_TAR.GetSQLDataStr() + " " + BIT_SAAT.Text + "' ";
            if (MASA_TANIMI.IsNotEmpty())
            {
                grdIptalStok.SQLText += "AND MASA.MASATANIMI = '" + MASA_TANIMI.GetDataStr() + "' ";
            }
            grdIptalStok.SQLText += "ORDER BY IPTAL.CREATE_DATE";
            grdIptalStok.Open();

            dsRapor = grdIptalStok.gridDataSet;
        }
Exemplo n.º 3
0
 private void RefreshGrid()
 {
     grdMasaHareketRaporu.SQLText = "SELECT " +
                                    "MASA.MASA_TANIMI AS MASA_ADI " +
                                    ", CASE HAR.GARSON_RECID " +
                                    "    WHEN - 1 THEN 'Kasa' " +
                                    "    ELSE(SELECT GARSON_ADI FROM TBLBLUEGARSON GARSON WHERE GARSON.REC_ID = HAR.GARSON_RECID) " +
                                    "    END AS GARSON_ADI " +
                                    ", STOK.STOK_ADI " +
                                    ", MIKTAR, HAR.CREATE_DATE AS TARIH " +
                                    "FROM[TBLBLUEGARSONHAR] HAR, TBLSTOK STOK, TBLBLUEADISYON AD, TBLBLUEMASA MASA " +
                                    "WHERE /*WS*/HAR.STOK_KODU = STOK.STOK_KODU ";
     if (MASA_TANIMI.IsNotEmpty())
     {
         grdMasaHareketRaporu.SQLText += "AND MASA.MASA_TANIMI = '" + MASA_TANIMI.GetDataStr() + "' ";
     }
     grdMasaHareketRaporu.SQLText += "AND HAR.CREATE_DATE >= '" + BAS_TAR.GetSQLDataStr() + " " + BAS_SAAT.Text + "' AND HAR.CREATE_DATE <= '" + BIT_TAR.GetSQLDataStr() + " " + BIT_SAAT.Text + "' " +
                                     "AND HAR.ADISYON_RECID = AD.REC_ID " +
                                     "AND AD.MASA_RECID = MASA.REC_ID " +
                                     "AND (SELECT COUNT(*) FROM TBLBLUEADISYONHAR ADHAR WHERE ADHAR.ADISYON_RECID = AD.REC_ID) > 0 /*WE*/" +
                                     "ORDER BY HAR.CREATE_DATE, HAR.GARSON_RECID, STOK.STOK_ADI ";
     grdMasaHareketRaporu.Open();
     dsRapor = grdMasaHareketRaporu.gridDataSet;
 }
Exemplo n.º 4
0
 private void MASA_TANIMI_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Modifiers == Keys.Control && e.KeyCode == Keys.F1)
     {
         if (MASA_TANIMI.IsNotEmpty())
         {
             ArsSQLQry qryMasa = new ArsSQLQry();
             qryMasa.SQLText = "SELECT TOP 1 MASA_TANIMI FROM [TBLBLUEMASA] WHERE /*WS*/MASA_TANIMI LIKE '" + MASA_TANIMI.GetDataStr() + "%'/*WE*/ ORDER BY REC_ID DESC";
             qryMasa.Open();
             if (qryMasa.Found())
             {
                 MASA_TANIMI.SetDataStr(qryMasa.GetString("MASA_TANIMI"));
             }
         }
     }
 }