コード例 #1
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            /*using (SqlCeConnection connection = new SqlCeConnection(ConnectionString))
             * {
             *  string query = "SELECT * FROM USER WHERE LOGIN='******' AND PASSWORD='******'";
             *  SqlCeDataAdapter sdAdapter = new SqlCeDataAdapter(query, connection);
             *
             *  DataTable dTable = new DataTable();
             *  try {
             *  sdAdapter.Fill(dTable);}
             *  catch (Exception xe)
             *  {
             *      Console.WriteLine("{0} Exception caught.", xe);
             *  }
             *
             *  if (dTable.Rows.Count > 0)
             *  {
             *      this.Hide();
             *      MainWindow mv = new MainWindow();
             *      mv.Show();
             *
             *  }
             *  else
             *  {
             *      Error.Visibility = Visibility.Visible;
             *
             *  }
             * }*/
            this.Hide();
            ClientPage cpage = new ClientPage(new Client(UsernameBox.Text, 0, false));

            cpage.Show();
            Console.WriteLine(ConnectionString);
        }
コード例 #2
0
 public ClientItems(ClientPage mw)
 {
     InitializeComponent();
     this.cpage = mw;
 }