예제 #1
0
 public UpdateTypeForm(ExtendedForm parentForm, bool isNoteOnly = false) : base(parentForm)
 {
     InitializeComponent();
     UpdateTypeCombo.FillComboBox(Attributes.DeviceAttributes.ChangeType);
     if (isNoteOnly)
     {
         UpdateTypeCombo.SetSelectedAttribute(Attributes.DeviceAttributes.ChangeType["NOTE"]);
         UpdateTypeCombo.Enabled = false;
         ValidateUpdateType();
     }
     else
     {
         UpdateTypeCombo.SelectedIndex = -1;
     }
 }
예제 #2
0
 private bool ValidateUpdateType()
 {
     if (UpdateTypeCombo.SelectedIndex > -1)
     {
         ErrorProvider.SetError(UpdateTypeCombo, "");
         SubmitButton.Enabled = true;
         return(true);
     }
     else
     {
         SubmitButton.Enabled = false;
         UpdateTypeCombo.Focus();
         ErrorProvider.SetError(UpdateTypeCombo, "Please select a change type.");
     }
     return(false);
 }