private void refresh() { NameTextBox.Clear(); ProjectComboBox.SelectedIndex = 0; PhoneTextBox.Clear(); passwordTextBox.Clear(); confrimPWTextBox.Clear(); CommentTextBox.Clear(); bindingDateGridView(null); }
private void CommentTextBox_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter && !string.IsNullOrEmpty(CommentTextBox.Text)) { try { m_WallPost.Comment(CommentTextBox.Text); CommentTextBox.Clear(); } catch (Exception ex) { MessageBox.Show(string.Format("Unable to post comment. Info: {0}", ex.Message)); } } }
private void ResetForm() { CommentTextBox.Clear(); TypeComboBox.SelectedIndex = 0; ReasonComboBox.SelectedIndex = 0; CurrencyComboBox.SelectedIndex = 0; DateTimePicker.Value = DateTime.Now; TransactionOwnerComboBox.SelectedIndex = 0; AmountNumericUpDown.Value = AmountNumericUpDown.Minimum; ErrorProvider.SetError(TypeComboBox, ""); ErrorProvider.SetError(ReasonComboBox, ""); ErrorProvider.SetError(CurrencyComboBox, ""); ErrorProvider.SetError(TransactionOwnerComboBox, ""); }