Exemple #1
0
        /// <summary>
        /// view partnership details button was clicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button      button = sender as Button;
            Partnership ad     = button.DataContext as Partnership;

            DataTable dt = _controller.getAdvertisments(ad.Type, ad.Id);

            DataRow[]       rows = dt.Select();
            ViewPartnership vp   = new ViewPartnership(ref _controller, rows[0], ad.Id, _userMail, ad.Type, ad.ManagerMail, false, rows[0][7].ToString());

            vp.Show();
        }
Exemple #2
0
        /// <summary>
        /// display partnership details button in the ads list was clicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button       button = sender as Button;
            advertisment ad     = button.DataContext as advertisment;

            DataTable dt = controller.getAdvertisments(ad.Type, ad.Id);

            DataRow[]       rows = dt.Select();
            ViewPartnership vp   = new ViewPartnership(ref controller, rows[0], ad.Id, _userMail, ad.Type, ad.ManagerMail, true, "-1");

            vp.Show();
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button           button       = sender as Button;
            advertisment     ad           = button.DataContext as advertisment;
            OleDbCommand     command      = new OleDbCommand("select * from Partnerships" + ad.Type + " where ID = " + ad.Id, connection);
            OleDbDataAdapter tableAdapter = new OleDbDataAdapter(command);
            DataTable        dt           = new DataTable();

            tableAdapter.Fill(dt);
            DataRow[]       rows = dt.Select();
            ViewPartnership vp   = new ViewPartnership(rows[0]);

            vp.Show();
        }