Ejemplo n.º 1
0
        private void modifyCommand(object parameter)
        {
            if (string.IsNullOrEmpty(Firstname) || string.IsNullOrEmpty(Lastname))
            {
                return;
            }

            if (ModifyContent.ToLower() == "add")
            {
                modifyEntity();
                runTask(SQLFunctionType.Add);
            }
            else
            {
                if (dataModified() == false)
                {
                    return;
                }

                WindowMessageResult modifyResult = MessageBoxEnhanced.Show(
                    "Question...",
                    "You are about to modify a record in the database! Do you wish to continue?",
                    WindowMessageButtons.YesNo,
                    WindowMessageIcon.Question);

                if (modifyResult == WindowMessageResult.Yes)
                {
                    modifyEntity();
                    runTask(SQLFunctionType.Modify);
                }
            }
        }
Ejemplo n.º 2
0
 /*The method ForEach executed the given delegate method for each node in the branch*/
 public void ForEach(ModifyContent method)
 {
     method(this);
     foreach (TreeNode <T> childNode in childNodes)
     {
         childNode.ForEach(method);
     }
 }