Пример #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (!validator.Validate())
            {
                return;
            }

            try
            {
                vehicle v = ((vehicle)bdgVehicle.Current);
                v.Save();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(String.Format("{0}\n\n{1}", ex.Message, ex.InnerException));
            }
            finally
            {
                if (this.MessageToSave("Veículo"))
                {
                    desk.AddTabAndCloseCurrent(new VehicleForm(null), "Novo Veículo", false);
                }
            }
        }