예제 #1
0
        private bool dbConnectionOpener()
        {
            Source.MySqlDB mySql = new Source.MySqlDB();
            bool           conn  = mySql.IsConnected();

            mySql.Close();
            return(conn);
        }
예제 #2
0
 private void ButtonInfoLoad()
 {
     if (Session.UserData.kategoria == 2)
     {
         AdminBtn.Visibility = Visibility.Visible;
     }
     else
     {
         AdminBtn.Visibility = Visibility.Hidden;
     }
     Source.MySqlDB mySql = new Source.MySqlDB();
     projektek_list.ItemsSource    = new Utilities().Data_PorjectListSmall();
     uj_jelolt_result.Text         = mySql.Count("SELECT count(jeloltek.id) FROM jeloltek WHERE friss=1 AND ervenyes=1 AND statusz = 1 AND jeloltek.reg_date > '" + Session.UserData.belepve + "'").ToString() + " db";
     nem_megnyitott_result.Text    = mySql.Count("SELECT count(*) FROM jeloltek WHERE friss = 1 AND ervenyes=1 AND statusz = 1").ToString() + " db";
     osszes_jelolt_result.Text     = mySql.Count("SELECT count(jeloltek.id) FROM jeloltek").ToString() + " db";
     projektben_jelolt_result.Text = mySql.Count("SELECT COUNT(DISTINCT jelolt_id) FROM projekt_jelolt_kapcs;").ToString() + " db";
     aktiv_projekt_result.Text     = mySql.Count("SELECT count(id) FROM projektek WHERE statusz = 1;").ToString() + " db";
     //passziv_projekt_result.Text = mySql.Count("SELECT count(id) FROM projektek WHERE statusz = 0;").ToString() + " db";
     kapcsolt_projekt_result.Text = mySql.Count("SELECT count(projekt_id) FROM projekt_ertesitendok_kapcs LEFT JOIN projektek ON projekt_id = projektek.id WHERE statusz = 1 AND ertesitendok_id = " + Session.UserData.id + ";").ToString() + " db";
     //profession_list_result.Text = mySql.Count("SELECT count(id) FROM pmkcvtest.profession_jeloltek").ToString() + " db";
     mySql.Close();
 }