예제 #1
0
        private void btnEkle_Click(object sender, EventArgs e)
        {
            AracWebService aracWebService = new AracWebService();
            Arac           arac           = new Arac();

            if (cmbBxAirbag.Text == "Var")
            {
                arac.airbag = true;
            }
            else
            {
                arac.airbag = false;
            }
            arac.bagajHacmi   = Convert.ToInt16(txtBagaj.Text);
            arac.ehliyetYasi  = Convert.ToInt16(txtEhliyetyas.Text);
            arac.gunlukFiyat  = Convert.ToDecimal(txtFiyat.Text);
            arac.gunlukKm     = Convert.ToInt16(txtGunlukKm.Text);
            arac.koltukSayisi = Convert.ToInt16(txtKoltuk.Text);
            arac.KM           = Convert.ToUInt32(txtKm.Text);
            arac.marka        = txtMarka.Text;
            arac.model        = txtModel.Text;
            arac.sirketID     = sirketId;
            arac.yasSiniri    = Convert.ToInt16(txtYas.Text);

            aracWebService.Add(arac);
            aracListele();
        }
예제 #2
0
      public ActionResult AddCar(Arac arac)
      {
          arac.sirketID = Convert.ToInt16(Session["sirketId"].ToString());
          AracWebService aracWebService = new AracWebService();

          aracWebService.Add(arac);
          return(RedirectToAction("Index"));
      }