コード例 #1
0
        public void addVehicle()
        {
            Vehicle vech = new Vehicle();

            vech.Name              = nameText.Text;
            vech.Serial_number     = serialNumText.Text;
            vech.Buy_date          = this.buyDateTimePicker.Value;
            vech.Last_service_date = this.serviceDateTimePicker.Value;
            vech.Remark            = remarkText.Text;

            InsertSQL vechHnd   = new InsertSQL();
            int       addrecord = vechHnd.addNewVehicle(vech);

            MessageBox.Show(addrecord + "Your record is added");
        }