private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            SqlAction sql = new SqlAction();

            Key = sql.Auentific(TB.Text, PB.Password);
            if (Key != 0)
            {
                Profile myProfile = new Profile(Key);
                myProfile.Owner = this;
                myProfile.Show();
                this.Visibility = Visibility.Collapsed;//Visibility.Visible;///
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("You are input invalid login or password", "Confirmation", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
            }
            //    this.Hide();
        }
Esempio n. 2
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            Profile myProfile = new Profile(ID);

            myProfile.Show();
        }