Ejemplo n.º 1
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Car           oCar           = dtgCars.SelectedItem as Car;
                ucAddEditCars oucAddEditCars = new ucAddEditCars(oCar, true);
                winDialog     oDialog        = new winDialog(oucAddEditCars)
                {
                    ShowInTaskbar = true,
                    WindowTitle   = "Edit a Car",
                    Height        = 235,
                    Width         = 510
                };
                oDialog.ShowDialog();

                UpdateGrid();
            }
            catch (Exception)
            {
                MessageBox.Show("Can not open window to edit car.");
            }
        }
Ejemplo n.º 2
0
        private void btnAddCar_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Car           oCar           = new Car();
                ucAddEditCars oucAddEditCars = new ucAddEditCars(oCar, false);
                winDialog     oDialog        = new winDialog(oucAddEditCars)
                {
                    ShowInTaskbar = true,
                    WindowTitle   = "Add a new Car",
                    Height        = 235,
                    Width         = 510
                };
                oDialog.ShowDialog();

                UpdateGrid();
            }
            catch (Exception)
            {
                MessageBox.Show("Can not open window to add car.");
            }
        }
Ejemplo n.º 3
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Car oCar = dtgCars.SelectedItem as Car;
                ucAddEditCars oucAddEditCars = new ucAddEditCars(oCar, true);
                winDialog oDialog = new winDialog(oucAddEditCars)
                {
                    ShowInTaskbar = true,
                    WindowTitle = "Edit a Car",
                    Height = 235,
                    Width = 510
                };
                oDialog.ShowDialog();

                UpdateGrid();


            }
            catch (Exception)
            {

                MessageBox.Show("Can not open window to edit car.");
            }
        }
Ejemplo n.º 4
0
        private void btnAddCar_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Car oCar = new Car();
                ucAddEditCars oucAddEditCars = new ucAddEditCars(oCar, false);
                winDialog oDialog = new winDialog(oucAddEditCars)
                {
                    ShowInTaskbar = true,
                    WindowTitle = "Add a new Car",
                    Height = 235,
                    Width = 510
                };
                oDialog.ShowDialog();

                UpdateGrid();


            }
            catch (Exception)
            {

                MessageBox.Show("Can not open window to add car.");
            }
        }