コード例 #1
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            this.Hide();
            MainMenuUser window = new MainMenuUser();

            window.Show();
        }
コード例 #2
0
ファイル: AddEvent.cs プロジェクト: pgargula/CityUp
        private void closeButton_Click(object sender, EventArgs e)
        {
            this.Hide();
            MainMenuUser window = new MainMenuUser();

            window.Show();
        }
コード例 #3
0
        private void loginButton_Click(object sender, EventArgs e)
        {
            string login    = loginText.Text;
            string password = passwordText.Text;

            if (sqlConnect.loginValidate(login, password) == true)
            {
                if (sqlConnect.loginValidateAdmin(login) == true)
                {
                    MessageBox.Show("Zalogowano pomyślnie w trybie administratora");

                    MainMenuAdmin window = new MainMenuAdmin();
                    window.Show();
                    this.Hide();
                }
                if (sqlConnect.loginValidateAdmin(login) == false)
                {
                    MessageBox.Show("Zalogowano pomyślnie w trybie użytkownika");

                    MainMenuUser window = new MainMenuUser();
                    window.Show();
                    this.Hide();
                }
            }
            else
            {
                MessageBox.Show("blad");
            }
        }
コード例 #4
0
ファイル: AddEvent.cs プロジェクト: pgargula/CityUp
        private void confirmEvent_Click(object sender, EventArgs e)
        {
            string   eventName        = eventNameText.Text;
            string   eventDescription = eventDescriptionText.Text;
            string   owner            = Session.login;
            int      status           = 0;
            string   city             = Session.city;
            DateTime myDate           = DateTime.Now;

            string     longDateString = myDate.ToString("dd-MM-yyyy-hh-mm");
            string     photo          = Session.id + "_" + longDateString + ".jpg";
            SQLConnect sqlConnect     = new SQLConnect();

            sqlConnect.addEvent(eventName, eventDescription, owner, status, city, photo);
            FtpController ftp = new FtpController();


            ftp.upload("uploads/" + Session.id + "_" + longDateString + ".jpg", photoName);
            MessageBox.Show("Dziękujemy za dodanie zdarzenia :)");
            MainMenuUser window = new MainMenuUser();

            window.Show();
            this.Close();
        }