Ejemplo n.º 1
0
        /// <summary>
        /// Called whenever the user saves their changes in an editing sidebar
        /// </summary>
        internal void UpdateFromSidebar(string[] data, bool isNew)
        {
            // Update the correct table with the new data
            switch (mode)
            {
            case contactString: dtgContacts.UpdateData(data, isNew); break;

            case dogString: dtgDogs.UpdateData(data, isNew); break;

            case clientString: dtgClients.UpdateData(data, isNew); break;
            }

            // Bring the user back to editing
            if (isNew)
            {
                string prevMode = mode;
                UpdateMode("");
                UpdateMode(prevMode);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Called by the editing sidebar whenever the user wants to save their changes
 /// </summary>
 public void UpdateFromSidebar(string[] newData, bool isNew)
 {
     filterableDataGrid.UpdateData(newData, isNew);
 }