private void IsTransferOrFiktifTicket(int _TicketID, out bool _IsTransfer, out bool _IsFiktif) { _IsTransfer = false; _IsFiktif = false; Hashtable hshTicketInf = DBProcess.SimpleQuery("KUYRUK", "WHERE BID = " + _TicketID, "", "TRANSFER, OZEL_MUSTERI"); DataTable dtTciketInf = null; if (hshTicketInf.ContainsKey("Error")) { return; } else { dtTciketInf = (DataTable)hshTicketInf["DataTable"]; if (dtTciketInf.Rows.Count > 0) { _IsFiktif = bool.Parse(dtTciketInf.Rows[0]["OZEL_MUSTERI"].ToString()); _IsTransfer = bool.Parse(dtTciketInf.Rows[0]["TRANSFER"].ToString()); } } }
public int GetNextTicketNumber() { int NextTicketNumber = 0; string strWhereSQL = string.Format("Where GRPID={0} AND (SIS_TAR BETWEEN '{1}' AND '{2}')", newBilet.GrupID, BiletTarih.ToString("MM.dd.yyyy 00:00:00"), BiletTarih.ToString("MM.dd.yyyy 23:59:59") ); DataTable dtTicketNumber = (DataTable)DBProcess.SimpleQuery("BILETLER", strWhereSQL, "ORDER BY BID DESC", "TOP (1) BILET_NO")["DataTable"]; if (dtTicketNumber != null) { if (dtTicketNumber.Rows.Count > 0) { NextTicketNumber = int.Parse(dtTicketNumber.Rows[0][0].ToString()) + 1; } else { NextTicketNumber = grup.BaslangicNo; } } else { NextTicketNumber = 0; } return(NextTicketNumber); }
public int GetNextTicketNumber(bool sureliMi) { //süreli mi true ise, verilemeyen biletlerden ilki gelmeli. int NextTicketNumber = 0; string strWhereSQL = string.Format( "Where GRPID={0} AND (SIS_TAR BETWEEN '{1}' AND '{2}') AND (OZEL_MUSTERI='False') AND (TRANSFER='False') ", this.GrupID, BiletTarih.ToString("yyyy.MM.dd 00:00:00"), BiletTarih.ToString("yyyy.MM.dd 23:59:59") ); DataTable dtTicketNumber = (DataTable)DBProcess.SimpleQuery("BILETLER", strWhereSQL, "ORDER BY BID DESC limit 1", "BILET_NO")["DataTable"]; if (dtTicketNumber != null) { if (dtTicketNumber.Rows.Count > 0) { NextTicketNumber = int.Parse(dtTicketNumber.Rows[0][0].ToString()) + 1; } else { NextTicketNumber = grup.BaslangicNo; } } else { NextTicketNumber = 0; } return(NextTicketNumber); }
private static bool CheckLeapTicket() { bool durum = false; try { DataTable dtQueue = (DataTable)DBProcess.SimpleQuery( "KUYRUK INNER JOIN BILETLER ON KUYRUK.BID = BILETLER.BID", "Where BILETLER.SIS_TAR < '" + DateTime.Now.ToString("yyyy.MM.dd") + "'", "", "KUYRUK.BID, BILETLER.SIS_TAR")["DataTable"]; if (dtQueue != null && dtQueue.Rows.Count > 0) { foreach (DataRow item in dtQueue.Rows) { DBProcess.DeleteData("KUYRUK", "Where BID = " + item[0]); } durum = true; } } catch (Exception hata) { durum = false; Console.WriteLine("CheckLeapTicket. Hata:" + hata.Message); OlayGunluk.Olay("CheckLeapTicket. Hata:" + hata.Message); } return(durum); }
public bool Login(string p_UserName, string p_Pass) { Username = p_UserName; Pass = p_Pass; DataTable dtUserInf = (DataTable)DBProcess.SimpleQuery( "PERSONELLER", "WHERE KULLANICI_ADI='" + Username + "' AND SIFRE='" + Pass + "'", "", "PID, TID, AD, SOYAD" )["DataTable"]; if (dtUserInf.Rows.Count > 0) { this.PersonelID = int.Parse(dtUserInf.Rows[0]["PID"].ToString()); this.Ad = dtUserInf.Rows[0]["AD"].ToString(); this.Soyad = dtUserInf.Rows[0]["SOYAD"].ToString(); this.TerminalID = int.Parse(dtUserInf.Rows[0]["TID"].ToString()); return(true); } else { return(false); } }
private bool TerminalHasThisGroup(string _grpID, out bool _IsAssistGroup) { string strWhereSQL = string.Format("WHERE TID = {0} AND GRPID = {1}", SanalTerminal.TerminalID, _grpID); Hashtable hshGroups = DBProcess.SimpleQuery("TERMINAL_GRUP", strWhereSQL, "", "YARDIM_GRUBU"); DataTable dtGroupInf = null; _IsAssistGroup = false; if (hshGroups.ContainsKey("Error")) { return(false); } else { dtGroupInf = (DataTable)hshGroups["DataTable"]; if (dtGroupInf.Rows.Count > 0) { _IsAssistGroup = bool.Parse(dtGroupInf.Rows[0][0].ToString()); return(true); } else { return(false); } } }
public static bool GetDoubleClickCagriAktif() { Hashtable hshDoubleClick = DBProcess.SimpleQuery( "TERMINALLER", "WHERE TID = " + TerminalID, "", "DoubleClick" ); if (!hshDoubleClick.ContainsKey("Error")) { DataTable dtDoubleClick = (DataTable)hshDoubleClick["DataTable"]; if (dtDoubleClick != null && dtDoubleClick.Rows.Count > 0) { return(bool.Parse(dtDoubleClick.Rows[0][0].ToString())); } else { return(false); } } else { return(false); } }
public static int GetOtoCagriSuresi() { Hashtable hshOtoCagri = DBProcess.SimpleQuery( "TERMINALLER", "WHERE TID = " + TerminalID, "", "OTO_SURE" ); if (!hshOtoCagri.ContainsKey("Error")) { DataTable dtOtoSure = (DataTable)hshOtoCagri["DataTable"]; if (dtOtoSure == null || dtOtoSure.Rows.Count < 0) { return(0); } DateTime dtTimeOtoSure = DateTime.Parse(dtOtoSure.Rows[0][0].ToString()); TimeSpan tsOtoCagriSuresi = new TimeSpan(dtTimeOtoSure.Hour, dtTimeOtoSure.Minute, dtTimeOtoSure.Second); return(Convert.ToInt32(tsOtoCagriSuresi.TotalMilliseconds)); } else { return(0); } }
public static bool GetOtoCagriAktif() { Hashtable hshOtoCagri = DBProcess.SimpleQuery( "TERMINALLER", "WHERE TID = " + TerminalID, "", "OTO_CAGRI" ); if (!hshOtoCagri.ContainsKey("Error")) { DataTable dtOtoCagri = (DataTable)hshOtoCagri["DataTable"]; if (dtOtoCagri != null && dtOtoCagri.Rows.Count > 0) { return(bool.Parse(dtOtoCagri.Rows[0][0].ToString())); } else { return(false); } } else { return(false); } }
public int GetCalledTicketCount() { int rv_CalledTicketCount = 0; Hashtable hshCalledTicketResult; DataTable dtCalledTicketCount; string vs_WhereSQL = string.Empty; vs_WhereSQL = string.Format( "Where (TERMINAL_GRUP.TID = {0}) AND (BILETLER.SIS_TAR BETWEEN CONCAT(TIMESTAMPADD(dd, 0, TIMESTAMPDIFF(dd, 0, NOW())) , '00:00') AND CONCAT(TIMESTAMPADD(dd, 0, TIMESTAMPDIFF(dd, 0, NOW())) , '23:59'))", // "Where (TERMINAL_GRUP.TID = {0}) AND (BILETLER.SIS_TAR BETWEEN DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) + '00:00' AND DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) + '23:59')", this.TID); hshCalledTicketResult = DBProcess.SimpleQuery( "TERMINAL_GRUP RIGHT OUTER JOIN BILETLER ON TERMINAL_GRUP.TID = BILETLER.TID", vs_WhereSQL, "", "COUNT(BILETLER.BID) AS [CalledTicketCount]" ); if (!hshCalledTicketResult.ContainsKey("Error")) { dtCalledTicketCount = (DataTable)hshCalledTicketResult["DataTable"]; rv_CalledTicketCount = Convert.ToInt32(dtCalledTicketCount.Rows[0]["CalledTicketCount"]); } return(rv_CalledTicketCount); }
public void ToIncreaseOrResetTransferRatio(int TermID, int GrpID) { string strWhereSQL = string.Format("Where TID={0} AND GRPID={1}", TermID, GrpID); int transferCagriOran = 0, transferCagrilan = 0; Hashtable hshIncrease; DataTable dtCallRatio = (DataTable)DBProcess.SimpleQuery( "TERMINAL_GRUP", strWhereSQL, "", "TRANSFER_ORAN, TRANSFER_CAGRILAN" )["DataTable"]; transferCagriOran = int.Parse(dtCallRatio.Rows[0]["TRANSFER_ORAN"].ToString()); transferCagrilan = int.Parse(dtCallRatio.Rows[0]["TRANSFER_CAGRILAN"].ToString()); hshIncrease = new Hashtable(); if (transferCagriOran > transferCagrilan + 1) { hshIncrease.Add("TRANSFER_CAGRILAN", transferCagrilan + 1); } else { hshIncrease.Add("TRANSFER_CAGRILAN", 0); } DBProcess.UpdateData("TERMINAL_GRUP", "Where TID=" + TermID + " AND GRPID=" + GrpID, hshIncrease); }
public DataTable Get() { DataTable dtGetData = (DataTable)DBProcess.SimpleQuery("KIOSK_AYAR", "", "", "*")["DataTable"]; return(dtGetData); }
public static DataTable LoadToControl() { DataTable dtData = (DataTable)DBProcess.SimpleQuery("GRUPLAR", "Where SIL='False'", "ORDER BY GRPID DESC", "GRPID, GRUP_ISMI")["DataTable"]; return(dtData); }
public DataTable Get(string Where, string Columns) { DataTable dtGetData = (DataTable)DBProcess.SimpleQuery("BUTONLAR", "Where " + Where, "", Columns)["DataTable"]; return(dtGetData); }
public DataTable Get(string Columns) { DataTable dtGet = (DataTable)DBProcess.SimpleQuery("SISTEM_CONFIG", "", "", Columns)["DataTable"]; return(dtGet); }
public DataTable Get(string Where, string Columns) { DataTable dtGroups = (DataTable)DBProcess.SimpleQuery("GRUPLAR", "Where " + Where + " AND SIL='False'", "ORDER BY GRPID DESC", Columns)["DataTable"]; return(dtGroups); }
public DataTable Get(string Where, string Columns, string OrderBy) { DataTable dtGroups = (DataTable)DBProcess.SimpleQuery("GRUPLAR", "Where " + Where + " AND SIL='False'", OrderBy, Columns)["DataTable"]; return(dtGroups); }
public DataTable Get(string Where, string Columns) { DataTable dtGet = (DataTable)DBProcess.SimpleQuery("BILETLER", "Where " + Where, "ORDER BY BID DESC", Columns)["DataTable"]; return(dtGet); }
public DataTable Get(string Where) { DataTable dtGet = (DataTable)DBProcess.SimpleQuery("BILET_AYAR", "Where " + Where, "ORDER BY KID DESC", "*")["DataTable"]; return(dtGet); }
public static DataTable LoadToControl() { DataTable dtData = (DataTable)DBProcess.SimpleQuery("TERMINALLER", "Where SIL='False'", "ORDER BY TID DESC", "TID, TERMINAL_AD")["DataTable"]; return(dtData); }
public bool IsActive(int _BtnID, int _KioskID) { DataTable dtIsAktif = (DataTable)DBProcess.SimpleQuery( "BUTONLAR", " WHERE BM_ADRES = " + _KioskID + " AND BTNID = " + _BtnID, "", "AKTIF")["DataTable"]; return(bool.Parse(dtIsAktif.Rows[0][0].ToString())); }
public DataTable Get(string Where, string Columns, string OrderBy) { DataTable dtGetData = (DataTable)DBProcess.SimpleQuery( "TERMINAL_GRUP", "Where " + Where, OrderBy, Columns)["DataTable"]; return(dtGetData); }
private static void EtiketBitti(int KioskId) { DataTable dt = (DataTable)DBProcess.SimpleQuery( "KIOSK_AYAR", "Where TID=" + KioskId, "", "TagOverFlowPerId" )["DataTable"]; int personelId = int.Parse(dt.Rows[0]["TagOverFlowPerId"].ToString()); //bu sanal terminale bilgiyi bas. }
public int GetWaitingTicketsCount() { var hshWaitingCounts = DBProcess.SimpleQuery("KUYRUK K INNER JOIN TERMINAL_GRUP G ON K.GRPID = G.GRPID", "WHERE G.TID = " + terminal.TID, "", "COUNT(K.BID) AS CBID"); if (!hshWaitingCounts.ContainsKey("Error")) { var dtWaitingCounts = (DataTable)hshWaitingCounts["DataTable"]; KuyruktakiKisiSayisi = dtWaitingCounts.Rows.Count > 0 ? int.Parse(dtWaitingCounts.Rows[0]["CBID"].ToString()) : 0; } else { KuyruktakiKisiSayisi = 0; } return(KuyruktakiKisiSayisi); }
public string GetWaitingPerson(int GrupID) { DataTable dtWaitingPersonCount = (DataTable)DBProcess.SimpleQuery("KUYRUK", "Where GRPID=" + GrupID, "", "COUNT(BID) AS BID")["DataTable"]; if (dtWaitingPersonCount != null && dtWaitingPersonCount.Rows.Count > 0) { return(dtWaitingPersonCount.Rows[0][0].ToString()); } else { return("0"); } }
private bool CheckMaxTicketLimit(string _BtnID, int _MaxTicketLimit) { try { string dtTodayTicket = DateTime.Now.ToShortDateString(); dtTodayTicket = DateTime.Parse(dtTodayTicket).ToString("yyyy.MM.dd"); string dtTodayTicketStart = string.Format("{0} 00:00:00", dtTodayTicket); string dtTodayTicketFinish = string.Format("{0} 23:59:59", dtTodayTicket); string strWhereSQL = string.Format( "Where (BTNID={0}) AND (SIS_TAR BETWEEN '{1}' AND '{2}')", _BtnID, dtTodayTicketStart, dtTodayTicketFinish ); DataTable dtTodayTicketCount = (DataTable)DBProcess.SimpleQuery( "BILETLER", strWhereSQL, "", "COUNT(BID)" )["DataTable"]; if (dtTodayTicketCount != null && dtTodayTicketCount.Rows.Count > 0) { if (int.Parse(dtTodayTicketCount.Rows[0][0].ToString()) < _MaxTicketLimit) { return(false); } else { return(true); } } else { return(true); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); return(false); } }
public bool Login() { DataTable dtUserInf = (DataTable)DBProcess.SimpleQuery( "PERSONELLER", "WHERE KULLANICI_ADI='" + Username + "' AND SIFRE='" + Pass + "'", "", "PID" )["DataTable"]; if (dtUserInf.Rows.Count > 0) { return(true); } else { return(false); } }
public DataTable Get(string Where, string Columns, string OrderBy) { Hashtable hshGet = new Hashtable(); DataTable dtGetData = new DataTable(); hshGet = DBProcess.SimpleQuery( "TERMINAL_GRUP", "Where " + Where, OrderBy, Columns); if (!hshGet.ContainsKey("Error")) { dtGetData = (DataTable)hshGet["DataTable"]; } return(dtGetData); }
public DataTable Get(string Where, string Columns) { Hashtable hshGetDataResults; DataTable dtGetData = new DataTable(); hshGetDataResults = DBProcess.SimpleQuery( "TERMINALLER", "Where " + Where, "", Columns); if (!hshGetDataResults.ContainsKey("Error")) { dtGetData = (DataTable)hshGetDataResults["DataTable"]; } return(dtGetData); }
public DataTable Get(string Where, string Columns) { DataTable dtGetData = new DataTable(); Hashtable hshGet = DBProcess.SimpleQuery( "MOLALAR", "Where " + Where, "", Columns); if (!hshGet.ContainsKey("Error")) { dtGetData = (DataTable)hshGet["DataTable"]; } else { } return(dtGetData); }