private void View_EditRequest(object sender, WorkerDetailsEventArgs e)
        {
            Guard.WhenArgument(e, "WorkerDetailsEventArgs").IsNull().Throw();

            var worker = this.WorkerDetailInformationDTOFactory.GetWorkerDetailInformationDTO(e.Id,
                                                                                              e.FirstName,
                                                                                              e.LastName,
                                                                                              e.Gender,
                                                                                              e.Age,
                                                                                              e.Rating,
                                                                                              e.Email,
                                                                                              e.PhoneNumber,
                                                                                              e.Country,
                                                                                              e.City,
                                                                                              e.Street);

            var result = this.workerService.UpdateWorkerDetailInformationDTO(worker);
        }
Exemple #2
0
        protected void OnEdit(object sender, EventArgs e)
        {
            var args = new WorkerDetailsEventArgs(this.Id.Value,
                                                  this.FirstName.Value,
                                                  this.LastName.Value,
                                                  this.Gender.Value,
                                                  this.Age.Value,
                                                  this.Rating.Value,
                                                  this.Email.Value,
                                                  this.PhoneNumber.Value,
                                                  this.Country.Value,
                                                  this.City.Value,
                                                  this.Address.Value);

            this.EditRequest?.Invoke(this, args);

            this.GetWorkerDetailsById(this, new StringEventArgs(this.Id.Value));

            this.toastText.Text = this.Model.EditingResult;

            // TODO run toastr script on client if posible
        }