Example #1
0
 private void ValidationErrorMessage(int index, string textBoxText)
 {
     if (_validateService.ValidateByIndex(index, textBoxText))
     {
         if (index == 2)
         {
             var date = DateTime.Parse(textBoxText);
             textBoxText = $"{date.Month}/{date.Day}/{date.Year}";
         }
         orderListView.SelectedItems[0].SubItems[index].Text = textBoxText;
         orderListView.SelectedItems[0].BackColor            = Color.White;
     }
     else
     {
         MessageBox.Show(_validateService.GetErrorMessageTextByIndex(index));
     }
 }