public static Address ReturnAddress(AddressUserControl target) { var address = new Address() { StreetLine1 = target.StreetLine1, StreetLine2 = target.StreetLine2, City = target.City, ZipCode = target.ZipCode, State = target.State }; return(address); }
private void InitializeUserControlsAddress() { addressUserControlFirst = new AddressUserControl { TextBoxHomePhoneText = MultiLanguageStrings.GetString(Ressource.CorporateUserControl, "Businessphone.Text"), TextBoxPersonalPhoneText = MultiLanguageStrings.GetString(Ressource.CorporateUserControl, "Cellphone.Text"), Dock = DockStyle.Fill }; groupBoxAddress.Controls.Add(addressUserControlFirst); }
private void InitializeUserControlsAddress() { addressUserControlFirst = new AddressUserControl(); addressUserControlFirst.TextBoxHomePhoneText = MultiLanguageStrings.GetString(Ressource.PersonUserControl, "Homephone.Text"); addressUserControlFirst.TextBoxPersonalPhoneText = MultiLanguageStrings.GetString(Ressource.PersonUserControl, "Personalphone.Text"); addressUserControlFirst.Dock = DockStyle.Fill; groupBoxFirstAddress.Controls.Add(addressUserControlFirst); addressUserControlSecondaryAddress = new AddressUserControl(false); addressUserControlSecondaryAddress.TextBoxHomePhoneText = MultiLanguageStrings.GetString(Ressource.PersonUserControl, "Businesscellphone.Text"); addressUserControlSecondaryAddress.TextBoxPersonalPhoneText = MultiLanguageStrings.GetString(Ressource.PersonUserControl, "Businessphone.Text"); addressUserControlSecondaryAddress.Dock = DockStyle.Fill; groupBoxSecondaryAddress.Controls.Add(addressUserControlSecondaryAddress); }
private void InitializeControls() { _ucAddress = new AddressUserControl(); _ctxProducts = new ContextMenuStrip(); _ucAddress.ExtraVisible = false; _ucAddress.Dock = DockStyle.Fill; gbAddress.Controls.Add(_ucAddress); InitializeLoanOfficers(); if (_village != null && _village.Id > 0) { tbName.Text = _village.Name; dtDate.Value = _village.EstablishmentDate.HasValue ? _village.EstablishmentDate.Value : TimeProvider.Now; _ucAddress.District = _village.District; _ucAddress.City = _village.City; _ucAddress.Comments = _village.Address; _ucAddress.ZipCode = _village.ZipCode; btnSave.Text = MultiLanguageStrings.GetString(Ressource.VillageForm, "Update.Text"); DisplayMembers(); DisplaySavings(); DisplayLoans(); if (_village.MeetingDay.HasValue) { cmbWeekDay.SelectedIndex = (int)_village.MeetingDay; cbMeetingDay.Checked = true; } if (_village.LoanOfficer != null) { foreach (object item in cbLoanOfficers.Items) { User user = item as User; if (user != null && user.Id == _village.LoanOfficer.Id) { cbLoanOfficers.SelectedItem = item; break; } } } } else { tabPageLoan.Enabled = false; tabPageSavings.Enabled = false; } PicturesServices ps = ServicesProvider.GetInstance().GetPicturesServices(); if (ps.IsEnabled()) { pictureBox1.Image = ps.GetPicture("VILLAGE", _village.Id, true, 0); pictureBox1.SizeMode = PictureBoxSizeMode.Zoom; pictureBox2.Image = ps.GetPicture("VILLAGE", _village.Id, true, 1); pictureBox2.SizeMode = PictureBoxSizeMode.Zoom; } else { pictureBox1.Visible = false; pictureBox2.Visible = false; linkLabelChangePhoto.Visible = false; linkLabelChangePhoto2.Visible = false; } foreach (Branch branch in User.CurrentUser.Branches) { cbBranch.Items.Add(branch); } if (_village.Id > 0) { cbBranch.SelectedItem = _village.Branch; } else if (cbBranch.Items.Count > 0) { cbBranch.SelectedIndex = 0; } btnPrint.ReportInitializer = report => report.SetParamValue("village_id", _village.Id); btnPrint.LoadReports(); }
private void InitializeUserControlsAddress() { addressUserControlFirst = new AddressUserControl { TextBoxHomePhoneText = MultiLanguageStrings.GetString(Ressource.GroupUserControl, "Homephone.Text"), TextBoxPersonalPhoneText = MultiLanguageStrings.GetString(Ressource.GroupUserControl, "Personalphone.Text") }; addressUserControlSecondaryAddress = new AddressUserControl { TextBoxHomePhoneText = MultiLanguageStrings.GetString(Ressource.GroupUserControl, "Businessphone.Text"), TextBoxPersonalPhoneText = MultiLanguageStrings.GetString(Ressource.GroupUserControl, "Businesscellphone.Text") }; addressUserControlFirst.Dock = DockStyle.Fill; groupBoxFirstAddress.Controls.Add(addressUserControlFirst); addressUserControlSecondaryAddress.Dock = DockStyle.Fill; groupBoxSecondaryAddress.Controls.Add(addressUserControlSecondaryAddress); }
private void InitializeProjectAddress() { projectAddressUserControl = new AddressUserControl(); projectAddressUserControl.Dock = DockStyle.Fill; gBProjectAddress.Controls.Add(projectAddressUserControl); }
private void InitializeControls() { _ucAddress = new AddressUserControl(); _ctxProducts = new ContextMenuStrip(); _ucAddress.ExtraVisible = false; _ucAddress.Dock = DockStyle.Fill; gbAddress.Controls.Add(_ucAddress); InitializeLoanOfficers(); if (_village != null && _village.Id > 0) { tbName.Text = _village.Name; dtDate.Value = _village.EstablishmentDate.HasValue ? _village.EstablishmentDate.Value : TimeProvider.Now; _ucAddress.District = _village.District; _ucAddress.City = _village.City; _ucAddress.Comments = _village.Address; _ucAddress.ZipCode = _village.ZipCode; btnSave.Text = MultiLanguageStrings.GetString(Ressource.VillageForm, "Update.Text"); DisplayMembers(); DisplaySavings(); DisplayLoans(); if (_village.MeetingDay.HasValue) { cmbWeekDay.SelectedIndex = (int) _village.MeetingDay; cbMeetingDay.Checked = true; } if (_village.LoanOfficer != null) { foreach (object item in cbLoanOfficers.Items) { User user = item as User; if (user != null && user.Id == _village.LoanOfficer.Id) { cbLoanOfficers.SelectedItem = item; break; } } } } else { tabPageLoan.Enabled = false; tabPageSavings.Enabled = false; } PicturesServices ps = ServicesProvider.GetInstance().GetPicturesServices(); if (ps.IsEnabled()) { pictureBox1.Image = ps.GetPicture("VILLAGE", _village.Id, true, 0); pictureBox1.SizeMode = PictureBoxSizeMode.Zoom; pictureBox2.Image = ps.GetPicture("VILLAGE", _village.Id, true, 1); pictureBox2.SizeMode = PictureBoxSizeMode.Zoom; } else { pictureBox1.Visible = false; pictureBox2.Visible = false; linkLabelChangePhoto.Visible = false; linkLabelChangePhoto2.Visible = false; } foreach (Branch branch in User.CurrentUser.Branches) { cbBranch.Items.Add(branch); } if (_village.Id > 0) { cbBranch.SelectedItem = _village.Branch; } else if (cbBranch.Items.Count > 0) { cbBranch.SelectedIndex = 0; } btnPrint.ReportInitializer = report => report.SetParamValue("village_id", _village.Id); btnPrint.LoadReports(); }