public void UpdateCommentsButtonClicked()
        {
            OneTextBoxForm           popup           = new OneTextBoxForm();
            OneTextBoxFormController popupController = new OneTextBoxFormController(popup);

            popupController.TextBoxLabel = "Comments";
            popupController.TextBoxValue = this.request.Comments;
            popupController.LoadView();
            if (popup.ShowDialog(this.view.ParentControl) == DialogResult.OK)
            {
                this.request.Comments = popupController.TextBoxValue;
                this.view.Comments    = popupController.TextBoxValue;
                QProtocolRequests.UpdateRequestComments(request, loginInfo.UserName);
            }
            popup.Dispose();
        }
Example #2
0
        public static string ShowOneTextBoxForm(string textBoxLabel, string textBoxValue, Control parentControl)
        {
            string                   result          = "";
            OneTextBoxForm           popup           = new OneTextBoxForm();
            OneTextBoxFormController popupController = new OneTextBoxFormController(popup);

            popupController.TextBoxLabel = textBoxLabel;
            popupController.TextBoxValue = textBoxValue;
            popupController.LoadView();

            DialogResult dialogResult = popup.ShowDialog(parentControl);

            if (dialogResult == DialogResult.OK)
            {
                result = popupController.TextBoxValue;
            }
            popup.Dispose();

            return(result);
        }