Esempio n. 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Vehicle newVehicle = new Vehicle();

            newVehicle.Title       = tbxTitle.Value;
            newVehicle.Description = tbxDescription.Value;
            newVehicle.Price       = Convert.ToDecimal(tbxPrice.Value);
            newVehicle.Type        = tbxType.Value;
            newVehicle.Brand       = tbxBrand.Value;
            newVehicle.Model       = tbxModel.Value;
            newVehicle.Year        = Convert.ToInt32(tbxYear.Value);
            newVehicle.Color       = tbxColor.Value;
            newVehicle.Status      = tbxStatus.Value;
            newVehicle.Url         = tbxUrl.Value;
            newVehicle.Name        = tbxName.Value;
            newVehicle.Email       = tbxEmail.Value;
            newVehicle.Telephone   = Convert.ToInt32(tbxTelephone.Value);

            _client.Add(newVehicle);

            Response.Redirect("/Vehicles");
        }