Ejemplo n.º 1
0
 private void EditFestival(GeneralVM generalvm)
 {
     generalvm.ShowEdit = "Hidden";
     generalvm.ShowCancel = "Visible";
     generalvm.ShowSave = "Visible";
     generalvm.Enabled = true;
 }
Ejemplo n.º 2
0
 private void SaveUpdateFestival(GeneralVM generalvm)
 {
     if (!Festival.IsValid())
         return;
     // Save Changes
     if (_OldFestival == null)
     {
         // Insert into db
         Festival.AddFestival(Festival);
         if (Festival.GetFestivals() != null)
         {
             if (Festival.GetFestivals().Count > 0)
             {
                 Festival = Festival.GetFestivals()[0];
                 _OldFestival = Festival;
             }
         }
     } else {
         // Update db
         Festival.UpdateFestival(Festival);
         _OldFestival = new Festival() { ID = Festival.ID, Name = Festival.Name, Street = Festival.Street, City = Festival.City };
     }
     // Update GUI
     generalvm.ShowEdit = "Visible";
     generalvm.ShowCancel = "Hidden";
     generalvm.ShowSave = "Hidden";
     Enabled = false;
 }
Ejemplo n.º 3
0
        private void CancelUpdateFestival(GeneralVM generalvm)
        {
            // Reset festival
            Festival = _OldFestival;//new Festival() { ID = _OldFestival.ID, Name = _OldFestival.Name, Street = _OldFestival.Street, City = _OldFestival.City};

            generalvm.ShowEdit = "Visible";
            generalvm.ShowCancel = "Hidden";
            generalvm.ShowSave = "Hidden";
            Enabled = false;
        }