private int CheckUser() { bool check; int i = 0; check = ErrorControls.NotEmptyTextBox(tbTitle); ErrorControls.CountErrors(ref i, check); check = ErrorControls.NotEmptyDataPicker(tbDateBegin); ErrorControls.CountErrors(ref i, check); check = ErrorControls.NotEmptyDataPicker(tbDateEnd); ErrorControls.CountErrors(ref i, check); check = ErrorControls.NotEmptyTextBox(tbCustomer); ErrorControls.CountErrors(ref i, check); if (lbEmployees.SelectedItems.Count == 0) { check = false; lbEmployees.Background = Brushes.Red; } else { lbEmployees.Background = (LinearGradientBrush)lbEmployees.FindResource("LightBrush"); } ErrorControls.CountErrors(ref i, check); return(i); }
private int CheckUser() { bool check; int i = 0; check = ErrorControls.NotEmptyTextBox(tbName); ErrorControls.CountErrors(ref i, check); check = ErrorControls.NotEmptyTextBox(tbLastName); ErrorControls.CountErrors(ref i, check); check = ErrorControls.NotEmptyDataPicker(tbBirthDay); ErrorControls.CountErrors(ref i, check); check = ErrorControls.NotEmptyTextBox(tbAdress); ErrorControls.CountErrors(ref i, check); check = ErrorControls.NotEmptyTextBox(tbPosition); ErrorControls.CountErrors(ref i, check); check = ErrorControls.NotEmptyTextBox(tbSalary) && ErrorControls.TextBoxToDouble(tbSalary); ErrorControls.CountErrors(ref i, check); return(i); }