Example #1
0
        private void EditFailure_Load(object sender, EventArgs e)
        {
            lblFailure.Text = _failure.Id.ToString();
            int typeOfFailureId = _failure.Id_TypeOfFailure;

            lblTypeOfFailure.Text = _failureRepository.GetTypeOfFailureById(typeOfFailureId);
            int userId = _failure.Id_Username;

            lblUsername.Text = _failureRepository.GetUserById(userId);
            int cityId = _failure.Id_City;

            lblCity.Text                      = _failureRepository.GetCityById(cityId);
            lblBeginDate.Text                 = _failure.BeginOfFailure.ToString();
            dateTimePickerEnd.Format          = DateTimePickerFormat.Custom;
            dateTimePickerEnd.CustomFormat    = " ";
            textBoxAdditionalDescription.Text = _failure.AdditionalDescription;
        }