Example #1
0
        private void btn_Edit_Click(object sender, EventArgs e)
        {
            DataTable Photos = classInfoAdapter.GetImages($"{((int)grdC_Info.GetFocusedRowCellValue("ID"))}");

            InfoModel infoModel = new InfoModel
                                      ((int)grdC_Info.GetFocusedRowCellValue("ID")
                                      , grdC_Info.GetFocusedRowCellValue("Brand_Name").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Model_Name").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Body_Type").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Walk").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Color").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Price").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Currency").ToString()
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Credit")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Barter")
                                      , grdC_Info.GetFocusedRowCellValue("Note").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Fuel_Type").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Transmission").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Gearbox").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Graduation_Year").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Engine_Capacity").ToString()
                                      , (int)grdC_Info.GetFocusedRowCellValue("HP")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Alloy_Wheels")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Central_Closure")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Leather_Salon")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Seat_Ventilation")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("USA")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Parking_Radar")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Xenon")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Luke")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Conditioner")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Rear_Camera")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Rain_Sensor")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Seat_Heating")
                                      , (bool)grdC_Info.GetFocusedRowCellValue("Side_Curtains")
                                      , grdC_Info.GetFocusedRowCellValue("Name").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("City").ToString()
                                      , grdC_Info.GetFocusedRowCellValue("Email").ToString()
                                      , Photos
                                      );
            FrmAdPlace frmAdPlace = new FrmAdPlace(infoModel);

            this.Hide();
            frmAdPlace.ShowDialog();
            retrieveInfo();
        }
        private void btn_addAd_Click(object sender, EventArgs e)
        {
            FrmAdPlace frmAdPlace = new FrmAdPlace();

            frmAdPlace.ShowDialog();
        }