private void OpenAnaMenu() { BlueAnaForm artezBlue = new BlueAnaForm(); artezBlue.kasaGiris = kasaGiris; artezBlue.garsonKodu = garsonKodu; artezBlue.garsonRecId = garsonRecId; artezBlue.Show(); //Application.Run(artezBlue); }
private void btnGiris_Click(object sender, EventArgs e) { ArsSQLQry qryGarson = new ArsSQLQry(); qryGarson.SQLText = "SELECT REC_ID, GARSON_KODU FROM [TBLBLUEGARSON] WHERE " + "/*WS*/SIFRE = '" + SIFRE.GetDataStr() + "'/*WE*/"; qryGarson.Open(); if (qryGarson.Found()) { if (ArsLibrary.appForm == null) { kasaGiris = false; garsonKodu = qryGarson.GetString("GARSON_KODU"); garsonRecId = qryGarson.GetInt("REC_ID"); //this.Close(); //Thread th = new Thread(OpenAnaMenu); //th.SetApartmentState(ApartmentState.STA); //th.Start(); SIFRE.Clear(); for (int i = 0; i < pbCircles.Count; i++) { pbCircles[i].Image = pbCircle.Image; } circleIndex = -1; BlueAnaForm artezBlue = new BlueAnaForm(); artezBlue.kasaGiris = kasaGiris; artezBlue.garsonKodu = garsonKodu; artezBlue.garsonRecId = garsonRecId; artezBlue.Show(); } else { SIFRE.Clear(); for (int i = 0; i < pbCircles.Count; i++) { pbCircles[i].Image = pbCircle.Image; } circleIndex = -1; BlueAnaForm artezBlue = new BlueAnaForm(); artezBlue.kasaGiris = false; artezBlue.garsonKodu = qryGarson.GetString("GARSON_KODU"); artezBlue.garsonRecId = qryGarson.GetInt("REC_ID"); artezBlue.Show(); //this.Close(); } } else { ArsSQLQry qryKasa = new ArsSQLQry(); qryKasa.SQLText = "SELECT STR_DEGER FROM [TBLPARAMETRE] WHERE " + "/*WS*/MODUL = 'Artez Blue' " + "AND PARAMETRE = 'KASA_GIRIS_SIFRE' " + "AND STR_DEGER = '" + SIFRE.Text + "'/*WE*/"; qryKasa.Open(); if (qryKasa.Found()) { if (ArsLibrary.appForm == null) { kasaGiris = true; //this.Close(); //Thread th = new Thread(OpenAnaMenu); //th.SetApartmentState(ApartmentState.STA); //th.Start(); SIFRE.Clear(); for (int i = 0; i < pbCircles.Count; i++) { pbCircles[i].Image = pbCircle.Image; } circleIndex = -1; BlueAnaForm artezBlue = new BlueAnaForm(); artezBlue.kasaGiris = kasaGiris; artezBlue.garsonKodu = garsonKodu; artezBlue.garsonRecId = garsonRecId; artezBlue.Show(); } else { SIFRE.Clear(); for (int i = 0; i < pbCircles.Count; i++) { pbCircles[i].Image = pbCircle.Image; } circleIndex = -1; BlueAnaForm artezBlue = new BlueAnaForm(); artezBlue.kasaGiris = true; artezBlue.Show(); //this.Close(); } } else { SIFRE.Clear(); for (int i = 0; i < pbCircles.Count; i++) { pbCircles[i].Image = pbCircle.Image; } circleIndex = -1; ArsMessage.ShowMessage("Hata", "Hatalı Parola!"); } } }