Esempio n. 1
0
        public bool Save()
        {
            CompanyInformationDTO companyInfoDTO = new CompanyInformationDTO
            {
                CompanyName = CompanyNameTextBox.Text,
                Address     = AddressTextBox.Text,
                PhoneNumber = PhoneNumberTextBox.Text,
                TIN         = TINTextBox.Text,
                ZipCode     = ZipCodeTextBox.Text
            };

            SubmitChanges(companyInfoDTO);
            return(true);
        }
Esempio n. 2
0
 public void LoadData(CompanyInformationDTO companyInformationDTO)
 {
     try
     {
         this.CompanyNameTextBox.Text = companyInformationDTO.CompanyName;
         this.AddressTextBox.Text     = companyInformationDTO.Address;
         this.PhoneNumberTextBox.Text = companyInformationDTO.PhoneNumber;
         this.ZipCodeTextBox.Text     = companyInformationDTO.ZipCode;
         this.TINTextBox.Text         = companyInformationDTO.TIN;
     }
     catch (Exception ex)
     {
         NotifyExceptionOccurence(new ExceptionNotification(ex.Message));
     }
 }
Esempio n. 3
0
        public void SubmitChanges(CompanyInformationDTO companyInformationDTO)
        {
            if (_controller == null)
            {
                if (_model == null)
                {
                    _model = new CompanyInformationModel();
                }

                _controller = new CompanyInformationController(this, _model);
                _model.NotifySuccessfulOperation += new NotifySuccessfulOperationEventHandler(NotifySuccess);
            }

            _controller.CompanyInformation = companyInformationDTO;
        }