private void TpDateLast_ValueChanged(object sender, EventArgs e)
 {
     using (var CarService = new CarServiceSoapClient())
     {
         var cars = CarService.GetAvailableCarByCompanyID(tpDateFirst.Value, tpDateLast.Value, CompanyID);
         dgwCarList.DataSource = cars;
         CarService.Close();
     }
 }
 private void FrmNewReservation_Load(object sender, EventArgs e)
 {
     using (var CarService = new CarServiceSoapClient())
     {
         var cars = CarService.GetCars(frmMain.Company.CompanyID);
         dgwCarList.DataSource = cars;
         CarService.Close();
     }
 }
Esempio n. 3
0
 private void FrmUpdateCar_Load(object sender, EventArgs e)
 {
     using (var CarService = new CarServiceSoapClient())
     {
         var cars = CarService.GetCars(frmMain.Company.CompanyID);//login olan şirketin id si
         dgwCars.DataSource = cars;
         CarService.Close();
     }
 }
 private void frmDeleteCar_Load(object sender, EventArgs e)
 {
     using (var carClient = new CarServiceSoapClient())
     {
         var cars = carClient.GetCars(frmMain.Company.CompanyID);
         dgwCarList.DataSource = cars;
         carClient.Close();
     }
 }
Esempio n. 5
0
 private void BtnUpdateCar_Click(object sender, EventArgs e)
 {
     using (var CarService = new CarServiceSoapClient())
     {
         CarRequestDto UpdatedCar = new CarRequestDto
         {
             CarBrand             = txtBrand.Text,
             CarKM                = int.Parse(txtCarKm.Text),
             AirBagCount          = byte.Parse(txtAirbagCount.Text),
             CarModel             = txtModel.Text,
             CarPhotoURL          = txtPhotoUrl.Text,
             CarPriceForRent      = decimal.Parse(txtRentPrice.Text),
             CarSeatCount         = byte.Parse(txtSeatCount.Text),
             MinCustomerAge       = byte.Parse(txtMinCustomerAge.Text),
             MinDrivingLicenseAge = byte.Parse(txtMinLicenceAge.Text),
             MaxKmPerDay          = int.Parse(txtMaxKm.Text),
             CarTrunkVolume       = short.Parse(txtTrunkVolume.Text)
         };
         CarService.UpdateCar(UpdatedCar, int.Parse(txtCarId.Text));
         CarService.Close();
     }
 }