private void InitializeComponent() { LocalAddress address = new LocalAddress(); this.addressesSearchControl1 = new AddresseSearchControl(); base.SuspendLayout(); this.addressesSearchControl1.set_Location(new System.Drawing.Point(4, 5)); this.addressesSearchControl1.set_Name("addressesSearchControl1"); address.Code = ""; address.Id = 0L; address.IsDeleted = false; address.IsDirty = true; address.Level = AddressLevel.None; address.Name = "<не выбрано>"; address.ObjectWithIdType = null; address.Parent = address; address.ParentId = 0L; address.Socr = ""; this.addressesSearchControl1.SelectedAddress = address; this.addressesSearchControl1.set_Size(new System.Drawing.Size(0x194, 0x14d)); this.addressesSearchControl1.set_TabIndex(0); base.set_AutoScaleDimensions(new System.Drawing.SizeF(6f, 13f)); base.set_AutoScaleMode(System.Windows.Forms.AutoScaleMode.Font); base.set_ClientSize(new System.Drawing.Size(0x199, 340)); base.Controls.Add(this.addressesSearchControl1); base.set_FormBorderStyle(System.Windows.Forms.FormBorderStyle.FixedDialog); base.set_MaximizeBox(false); base.set_MinimizeBox(false); base.set_Name("AreaAddressesSearchForm"); base.set_ShowInTaskbar(false); base.set_StartPosition(System.Windows.Forms.FormStartPosition.CenterParent); this.set_Text("Поиск"); base.ResumeLayout(false); }
protected override void ClearText(object sender, System.EventArgs e) { this.SelectedLocalAddress = LocalAddress.Null; if (this.OnLocalAddressSelected != null) { this.OnLocalAddressSelected(null); } }
public void Selected(LocalAddress localAddress) { this.SelectedLocalAddress = localAddress; if (this.OnLocalAddressSelected != null) { this.OnLocalAddressSelected(localAddress); } }
public LocalAddressSelectorForm(LocalAddress la, LocalAddressHandler laHandler) : this() { this.laHandler = laHandler; if (la != null) { this.m_la = la; } }
public LocalAddressForm(LocalAddress address, LocalAddressHandler handler) { this.InitializeComponent(); this.handler = handler; if (address != null) { this.localAddressTree.SelectedAddress = address; } }
private void btnCancel_Click(object sender, System.EventArgs e) { if (this.handler != null) { this.handler(null); } this.SelectedAddress = LocalAddress.Null; base.Close(); }
private void btnOk_Click(object sender, System.EventArgs e) { if (this.handler != null) { this.handler(this.localAddressTree.SelectedAddress); } this.SelectedAddress = this.localAddressTree.SelectedAddress; base.Close(); }
public AddressForm(LocalAddress address, LocalAddress parent) { this.InitializeComponent(); if (address != null) { this.addressView.FillView(address); } else { this.addressView.ParentAddress = parent; } }
public BindingListView<FixedSummServiceView> Find(ServiceOld serviceOld, LocalAddress address) { BindingListView<FixedSummServiceView> view = new BindingListView<FixedSummServiceView>(); System.Data.SqlClient.SqlParameter[] parameters = new System.Data.SqlClient.SqlParameter[2]; parameters[0] = new System.Data.SqlClient.SqlParameter("@serviceId", System.Data.SqlDbType.BigInt); parameters[0].set_Value((long) serviceOld.Id); parameters[1] = new System.Data.SqlClient.SqlParameter("@addrId", System.Data.SqlDbType.BigInt); parameters[1].set_Value((long) address.Id); foreach (System.Data.DataRow row in DALSql.ExecuteDataTable(this.SelectFields + " from [sn].[GetFixedSummServices](@serviceId ,@addrId) t", parameters).Rows) { FixedSummServiceView view2 = this.Load(row); view.Add(view2); } return view; }
public static void AddHouseAndApartment(LocalAddressDTO dto, LocalAddress address) { if (dto.NewApartment && (Apartment.FindByAddress(address).get_Count() == 0)) { if (House.FindByAddress((LocalAddress) address.Parent) == House.Null) { AddHouse((LocalAddress) address.Parent); } Apartment apartment = new Apartment { AdrId = address.Id }; apartment.SetNewNumber(); apartment.HouseId = (address.Level == AddressLevel.MaxAddress) ? address.GetParent().GetHouse().Id : address.GetHouse().Id; apartment.SaveChanges(); } if (dto.NewHouse && (House.FindByAddress(address) == House.Null)) { AddHouse(address); } }
public static ObjectList<ServiceOld> FindBy(ServiceTypeOld type, Organization provider, AIS.SN.Model.DomainObjects.CanonicalService canonical, Organization houseHolder, Organization resourceProvider, LocalAddress adr, System.DateTime fromDate) { return Mappers.ServiceOldMapper.FindBy(type.Id, provider.Id, canonical.Id, houseHolder.Id, resourceProvider.Id, adr.Id, fromDate); }
private bool GetFlagComparison(LocalAddress localAddress, ExchangeRequestAddress exchangeRequestAddress) { return (bool) (((((exchangeRequestAddress.Flat == string.Empty) && (exchangeRequestAddress.House == string.Empty)) && ((exchangeRequestAddress.Street == string.Empty) && (exchangeRequestAddress.Region != string.Empty))) && (localAddress.Level == AddressLevel.MinAddress)) || ((bool) ((((exchangeRequestAddress.Flat == string.Empty) && (exchangeRequestAddress.House == string.Empty)) && ((exchangeRequestAddress.Street != string.Empty) && (localAddress.Level == AddressLevel.Улица))) || ((bool) ((((exchangeRequestAddress.Flat == string.Empty) && (exchangeRequestAddress.House != string.Empty)) && (localAddress.Level == AddressLevel.Дом)) || ((exchangeRequestAddress.Flat != string.Empty) && (localAddress.Level == AddressLevel.MaxAddress))))))); }
public static ObjectList<LocalAddress> GetChildrenAddress(LocalAddress parent) { return Mappers.LocalAddressMapper.GetChildrenByHouses(parent); }
public static House FindByAddress(LocalAddress address) { return Mappers.HouseMapper.FindByAddress(address); }
private void UpdateHouse(House house, LocalAddress address) { this.m_House = house; if ((this.m_House == null) || (this.m_House == House.Null)) { this.UnVisibleView(); } else { this.tstbApartmentAddress.set_Text(address.FullName); this.housePassportView.LoadControl(); if (!this.housePassportView.get_Visible()) { this.housePassportView.set_Visible(true); this.btnSave.set_Visible(true); } if (!this.historyHouseAreasView1.get_Visible()) { this.historyHouseAreasView1.set_Visible(true); } if (!this.houseIngenerTableView.get_Visible()) { this.houseIngenerTableView.set_Visible(true); this.btnSave2.set_Visible(true); } if (!this.houseCountersView.get_Visible()) { this.houseCountersView.set_Visible(true); } if (!this.houseServiceSeasonsView.get_Visible()) { this.houseServiceSeasonsView.set_Visible(true); } if (!this.houseTreatyCommitmentView.get_Visible()) { this.houseTreatyCommitmentView.set_Visible(true); } if (!this.nonresidentialApartmentsView.get_Visible()) { this.nonresidentialApartmentsView.set_Visible(true); } if (!this.houseOrganizationsView.get_Visible()) { this.houseOrganizationsView.set_Visible(true); } if (!this.houseServiceNormsView.get_Visible()) { this.houseServiceNormsView.set_Visible(true); } if (!this.houseServiceTariffsView.get_Visible()) { this.houseServiceTariffsView.set_Visible(true); } if (!this.housesBindingServicesView.get_Visible()) { this.housesBindingServicesView.set_Visible(true); } this.RefreshTabControl(); this.tabControl1_Selected(null, null); } }
public void SaveAddresses(LocalAddress adress) { ObjectList<LocalAddress> addresses = new ObjectList<LocalAddress> { adress }; this.SaveAddresses(addresses); }
private void FindAndSelectNode(System.Windows.Forms.TreeNodeCollection nodes, LocalAddress address) { foreach (System.Windows.Forms.TreeNode node in nodes) { if (node.get_Tag().Equals(address)) { base.set_SelectedNode(node); break; } if (address.HasParent(node.get_Tag() as LocalAddress)) { this.tree_BeforeExpand(this, new System.Windows.Forms.TreeViewCancelEventArgs(node, false, System.Windows.Forms.TreeViewAction.Expand)); node.Expand(); this.FindAndSelectNode(node.Nodes, address); } } }
private void addressTreeView_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e) { this.house = new House(); this.address = (LocalAddress) e.Node.get_Tag(); if (this.address.Level == AddressLevel.Улица) { this.tstbApartmentAddress.set_Text(this.address.FullName); this.tabControl.set_Visible(false); } if (this.address.Level == AddressLevel.Дом) { this.house = House.FindByAddress(this.address); this.tstbApartmentAddress.set_Text(this.address.FullName); this.UpdateBindingSourceHouseService(); this.UpdateHouseApartmentDetail(this.house.Id); this.UpdateBindingSourceHouseInspection(); this.tabControl.set_Visible(true); this.ujfHouseInfoView1.fill(this.house.Id); this.fillNotLivingAndLandArea(); this.fillHouseEngineerSystems(); this.UpdateBindingSourceMeeting(); } }
private void InitializeComponent() { LocalAddress address = new LocalAddress(); LocalAddress address2 = new LocalAddress(); this.btnCancel = new System.Windows.Forms.Button(); this.btnOk = new System.Windows.Forms.Button(); this.addressView = new AddressView(); base.SuspendLayout(); this.btnCancel.set_Anchor(System.Windows.Forms.AnchorStyles.Right | System.Windows.Forms.AnchorStyles.Bottom); this.btnCancel.set_DialogResult(System.Windows.Forms.DialogResult.Cancel); this.btnCancel.set_Location(new System.Drawing.Point(0x11e, 0xd6)); this.btnCancel.set_Name("btnCancel"); this.btnCancel.set_Size(new System.Drawing.Size(90, 30)); this.btnCancel.set_TabIndex(0x12); this.btnCancel.set_Text("Отменить"); this.btnCancel.set_UseVisualStyleBackColor(true); this.btnCancel.add_Click(new System.EventHandler(this.btnCancel_Click)); this.btnOk.set_Anchor(System.Windows.Forms.AnchorStyles.Right | System.Windows.Forms.AnchorStyles.Bottom); this.btnOk.set_DialogResult(System.Windows.Forms.DialogResult.OK); this.btnOk.set_Location(new System.Drawing.Point(190, 0xd6)); this.btnOk.set_Name("btnOk"); this.btnOk.set_Size(new System.Drawing.Size(90, 30)); this.btnOk.set_TabIndex(0x11); this.btnOk.set_Text("Принять"); this.btnOk.set_UseVisualStyleBackColor(true); this.btnOk.add_Click(new System.EventHandler(this.btnOk_Click)); this.addressView.set_Anchor(System.Windows.Forms.AnchorStyles.Right | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Top); this.addressView.set_Font(new System.Drawing.Font("Microsoft Sans Serif", 9.75f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0xcc)); this.addressView.set_Location(new System.Drawing.Point(4, 8)); this.addressView.set_Margin(new System.Windows.Forms.Padding(4)); this.addressView.set_Name("addressView"); this.addressView.NewApartment = false; this.addressView.NewHouse = false; this.addressView.ObjectWithId = null; address.Code = ""; address.Id = 0L; address.IsDeleted = false; address.IsDirty = true; address.Level = AddressLevel.None; address.Name = "<не выбрано>"; address.ObjectWithIdType = null; address2.Code = ""; address2.Id = 0L; address2.IsDeleted = false; address2.IsDirty = true; address2.Level = AddressLevel.None; address2.Name = "<не выбрано>"; address2.ObjectWithIdType = null; address2.Parent = address2; address2.ParentId = 0L; address2.Socr = ""; address.Parent = address2; address.ParentId = 0L; address.Socr = ""; this.addressView.ParentAddress = address; this.addressView.set_Size(new System.Drawing.Size(0x178, 0xc7)); this.addressView.set_TabIndex(0x13); base.set_AutoScaleDimensions(new System.Drawing.SizeF(8f, 16f)); base.set_AutoScaleMode(System.Windows.Forms.AutoScaleMode.Font); base.set_ClientSize(new System.Drawing.Size(0x17d, 0x100)); base.Controls.Add(this.addressView); base.Controls.Add(this.btnCancel); base.Controls.Add(this.btnOk); this.set_Font(new System.Drawing.Font("Microsoft Sans Serif", 9.75f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0xcc)); base.set_Margin(new System.Windows.Forms.Padding(4)); base.set_Name("AddressForm"); base.set_ShowInTaskbar(false); base.set_StartPosition(System.Windows.Forms.FormStartPosition.CenterScreen); this.set_Text("Ввод адреса"); base.ResumeLayout(false); }
public static void Save(Organization org, LocalAddress localAddress, string city, string street, string house, string flat) { Mappers.LocalAddressSynonymMapper.Save(org.Id, localAddress.Id, city, street, house, flat); }
public void SetAccount(Account account) { if ((account != null) && (account != Account.Null)) { this.DataSource = account; this.m_OwnerSelection.Clear(); this.m_OwnerSelection.LoadOwnerFromId(this.DataSource.OwnerId); if (this.DataSource.ApartmentId != 0L) { this.m_OwnerSelection.Apartment = this.DataSource.GetApartment(); } if (this.DataSource.Number == null) { this.m_AccountNumber.Clear(); } else { this.m_AccountNumber.set_Text(this.DataSource.Number); } this.tbxAccountHolder.set_Text(this.DataSource.HouseHolderName); this.m_FromDate.Value = this.DataSource.FromDate; this.m_ToDate.Value = this.DataSource.ToDate; this.tbIdentityCardNumber.set_Text(this.DataSource.IdentityCardNumber); this.tbIdentityCardHolderName.set_Text(this.DataSource.IdentityCardHolderName); this.tbNoticeAdrName.set_Text(this.DataSource.NoticeAdrName); this.cbNeedOwnerPresence.set_Checked(this.DataSource.NeedOwnerPresence); this.cbNeedPrintNotice.set_Checked(this.DataSource.NeedPrintNotice); this.cbCloseInPaymentsystem.set_Checked(this.DataSource.IsCloseInPaymentSystem); this.tbComment.set_Text(this.DataSource.Comment); LocalAddress address = new LocalAddress(); if (this.DataSource.NoticeAdrId != 0L) { address.Id = this.DataSource.NoticeAdrId; this.selectNoticeAdr.SelectedLocalAddress = address; } else { this.selectNoticeAdr.SelectedLocalAddress = LocalAddress.Null; } } }
private void btnMakeRequest_Click(object sender, System.EventArgs e) { LocalAddress selectedAddress = this.localAddressSelector.GetSelectedAddress(); if (selectedAddress == LocalAddress.Null) { Messages.ShowWarning(@"Не выбран адрес дома\квартиры"); } else { ExchangeRequestAddress flatCardByLocalAddress = ExchangeRequestAddress.GetFlatCardByLocalAddress(selectedAddress.Id); if (flatCardByLocalAddress == ExchangeRequestAddress.Null) { Messages.ShowWarning("Не найдено сопоставление для адреса в паспортном столе"); } else { flatCardByLocalAddress.ExchangeRequestId = 0L; flatCardByLocalAddress.Address = string.Format("{0} {1} {2}", flatCardByLocalAddress.OwnerLastName, flatCardByLocalAddress.OwnerFirstName, flatCardByLocalAddress.OwnerMiddleName); this.SelectedLocalAddress = selectedAddress; this.FlatCardAddresses = flatCardByLocalAddress; base.Close(); } } }
public ObjectList<LocalAddress> GetAddresses() { ObjectList<LocalAddress> localAddresses = this.GetLocalAddresses(); foreach (AreaApartment apartment in this.GetAreaApartments()) { Apartment apartment2 = Mappers.ApartmentMapper.FindById(apartment.ApartmentId); LocalAddress address = new LocalAddress { Id = apartment2.Id, ParentId = apartment2.AdrId, Level = AddressLevel.Жилье, Name = apartment2.Number + ", " + apartment2.OwnerName }; localAddresses.Add(address); } return localAddresses; }
private void btnCancel_Click(object sender, System.EventArgs e) { this.EnteredAddress = null; base.set_DialogResult(System.Windows.Forms.DialogResult.Cancel); base.Close(); }
private void AddAndSelectNode(LocalAddress address) { System.Windows.Forms.TreeNode node = new System.Windows.Forms.TreeNode(address.NameSocr.Trim() + this.GetSocr(address.Level)); node.set_Tag(address); if (this.IsExistChildren(address)) { node.Nodes.Add(""); } base.SelectedNode.Nodes.Add(node); base.set_SelectedNode(node); }
public System.Collections.Generic.List<LocalAddress> AddLocalAddressRange(LocalAddressDTO dto) { int num = System.Convert.ToInt32(dto.Name); int num2 = System.Convert.ToInt32(dto.NameTo); System.Collections.Generic.List<LocalAddress> list = new System.Collections.Generic.List<LocalAddress>(); for (int i = num; i <= num2; i = (int) (i + 1)) { LocalAddress address = new LocalAddress(); dto.Name = ((int) i).ToString(); address.SaveChanges(dto); list.Add(address); AddHouseAndApartment(dto, address); } return list; }
private bool IsExistChildren(LocalAddress address) { if (address.Level != AddressLevel.MaxAddress) { if (address.GetChildrenWithCount().get_Count() > 0) { return true; } } else if (Apartment.FindByAddress(address).get_Count() > 0) { return true; } return false; }
public static BindingListView<FixedSummServiceView> Find(ServiceOld serviceOld, LocalAddress address) { return Mappers.FixedSummServiceViewMapper.Find(serviceOld, address); }
private void btnOk_Click(object sender, System.EventArgs e) { bool flag = false; if (this.addressView.GetName() == "") { Messages.ShowWarning("Заполните поле наименование"); base.set_DialogResult(System.Windows.Forms.DialogResult.None); return; } this.addressView.NewApartment = false; this.addressView.NewHouse = false; AddressLevel level = this.addressView.GetLevel(); if (level == AddressLevel.None) { BalloonWindow.Show(this.btnOk, "Выберите уровень"); return; } LocalAddress address = (((LocalAddress) this.addressView.ObjectWithId) == null) ? LocalAddress.Null : ((LocalAddress) this.addressView.ObjectWithId); if (address != LocalAddress.Null) { if ((level == AddressLevel.Дом) && (House.FindByAddress(address) == House.Null)) { if (Messages.QuestionYesNo(this, "Паспорт дома по данному адресу не найден. Добавить его?") == System.Windows.Forms.DialogResult.Yes) { this.addressView.NewHouse = true; } } else if (((level == AddressLevel.MaxAddress) && (Apartment.FindByAddress(address).get_Count() == 0)) && (Messages.QuestionYesNo(this, "Паспорт квартиры по данному адресу не найден. Добавить его?") == System.Windows.Forms.DialogResult.Yes)) { this.addressView.NewApartment = true; } } else { switch (level) { case AddressLevel.MinAddress: { LocalAddress address2 = new LocalAddress { Name = this.addressView.GetName(), Level = AddressLevel.MinAddress }; address2.SaveChanges(); this.EnteredAddress = address2; return; } case AddressLevel.Дом: if (System.Windows.Forms.MessageBox.Show("Добавить паспорт дома по данному адресу (адресам)?", "Сообщение", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) { this.addressView.NewHouse = true; } goto Label_01CA; } if ((level == AddressLevel.MaxAddress) && (System.Windows.Forms.MessageBox.Show("Добавить паспорт квартиры по данному адресу (адресам)?", "Сообщение", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)) { this.addressView.NewApartment = true; if (((this.addressView.tbname.IndexOf("-") == -1) && User.IsMemberOf(RightsEnum.АРМБухгалтерБыстроеЗаполнениеПаспортаЖилья)) && (System.Windows.Forms.MessageBox.Show("Заполнить паспорт квартиры по данному адресу?", "Сообщение", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)) { flag = true; } } } Label_01CA: this.EnteredAddress = (LocalAddress) this.addressView.SaveChanges(false); base.set_DialogResult(System.Windows.Forms.DialogResult.OK); base.Close(); if (flag) { ApartmentFillingForm form = new ApartmentFillingForm(); form.Fill(Apartment.FindByAddress(this.EnteredAddress).get_Item(0)); form.ShowDialog(); } }
public static void AddHouse(LocalAddress address) { new House { AdrId = address.Id }.SaveChanges(); }