public ApartmentResidentHistoryForm(Apartment apr)
     : this()
 {
     this.apartment = apr;
     this.tbxNumer.set_Text(this.apartment.Number);
     this.bsApartmentResidents.set_DataSource(Mappers.ApartmentResidentMapper.FindByApartmentId(apr.Id));
 }
 public HouseCounterApartmentAddChangeForm()
 {
     this.m_HouseCounter = HouseCounter.Null;
     this.m_HouseCounterApartment = HouseCounterApartment.Null;
     this.m_Apartment = Apartment.Null;
     this.InitializeComponent();
 }
 public ApartmentAreaHistoryForm()
 {
     this.m_Apartment = Apartment.Null;
     this.m_ApartmentArea = ApartmentArea.Null;
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
 }
示例#4
0
 public ApartmentResidentForm()
 {
     this.apr = AIS.SN.Model.DomainObjects.ApartmentResident.Null;
     this.ap = Apartment.Null;
     this.m_Save = true;
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
 }
 public ApartmentNumberChangeForm(Apartment apartment)
     : this()
 {
     if ((apartment != null) && (apartment != Apartment.Null))
     {
         this.m_Apartment = apartment;
     }
 }
 public HouseCommonServicesForm(Apartment apartment, System.DateTime fromDate, System.DateTime toDate, ObjectList<ServiceOld> services)
     : this()
 {
     this.m_Apartment = apartment;
     this.m_FromDate = fromDate;
     this.m_ToDate = toDate;
     this.result = services;
 }
示例#7
0
 public void Fill(Apartment apartment)
 {
     if (this.m_Apartment.Id != apartment.Id)
     {
         this.m_Apartment = apartment;
         this.UpdateApartmentProperties();
     }
 }
示例#8
0
 public void Fill(Apartment EnteredAddress)
 {
     if ((EnteredAddress != null) && (EnteredAddress != Apartment.Null))
     {
         this.set_Text(this.get_Text() + " по адресу: " + EnteredAddress.AddressName.Substring((int) (EnteredAddress.AddressName.IndexOf(",") + 1)));
         this.m_Apartment = EnteredAddress;
         this.m_ApartmentInfoMimGeneralView.Fill(this.m_Apartment);
     }
 }
示例#9
0
 public static System.Data.DataTable GetResidentRegistrationsTable(Apartment ap, long personsId)
 {
     System.Data.SqlClient.SqlParameter[] parameters = new System.Data.SqlClient.SqlParameter[2];
     parameters[0] = new System.Data.SqlClient.SqlParameter("@apartmentId", System.Data.SqlDbType.BigInt);
     parameters[0].set_Value((long) ap.Id);
     parameters[1] = new System.Data.SqlClient.SqlParameter("@personsId", System.Data.SqlDbType.BigInt);
     parameters[1].set_Value((long) personsId);
     return DALSql.ExecuteDataTable("\r\n\t\t\t\tselect distinct p.id personsId, ar.dateb fromDate, ar.datee toDate, ar.relative, ar.typeResidents\r\n\t\t\t\tfrom sn.Apartments a\r\n\t\t\t\t\tinner join sn.ApartmentResidents ar on a.id = ar.apartmentId\r\n\t\t\t\t\tinner join sn.Persons p on ar.personId = p.id\r\n\t\t\t\twhere a.id=@apartmentId and p.id=@personsId\r\n", parameters);
 }
示例#10
0
 public ApartmentAreaHistoryForm(Apartment apart)
     : this()
 {
     if (((apart != null) && (apart != Apartment.Null)) && (this.m_Apartment.Id != apart.Id))
     {
         this.m_Apartment = apart;
         this.bsApartmentArea.set_DataSource(ApartmentArea.FindAllByApartmentId(this.m_Apartment.Id));
     }
 }
 private void accountApartmentTree_OnIExpandableNodeSelect(ObjectWithId owid)
 {
     if (((owid.Id != 0L) && (owid.Id != -1L)) && (owid is Apartment))
     {
         this.m_SelectedApartment = Mappers.ApartmentMapper.FindById(owid.Id);
         this.apartmentView.Fill(this.m_SelectedApartment, this.m_ApartmentSearch.m_servType, this.m_ApartmentSearch.m_sealId, this.m_ApartmentSearch.m_plombId, this.m_ApartmentSearch.m_indicationId);
         this.apartmentView.set_Visible(true);
         this.m_ApartmentNumberAddressPanel.set_Visible(true);
     }
 }
示例#12
0
 public void Fill(Apartment apartment)
 {
     if (apartment == null)
     {
         this.bsApartmentRequests.Clear();
     }
     else if ((this.m_Apartment == null) || (this.m_Apartment.Id != apartment.Id))
     {
         this.m_Apartment = apartment;
         this.UpdateApartmentRequests();
     }
 }
示例#13
0
 private void accountApartmentTree_OnIExpandableNodeSelect(ObjectWithId owid)
 {
     if ((!base.get_DesignMode() && ((owid.Id != 0L) && (owid.Id != -1L))) && (owid is Apartment))
     {
         this.m_SelectedApartment = Mappers.ApartmentMapper.FindById(owid.Id);
         this.apartmentView.ShowInputCountersAfterFill = this.apartmentSearchControl.IsLastInputBarcode;
         this.apartmentView.SearchControl = this.apartmentSearchControl;
         this.apartmentView.Fill(this.m_SelectedApartment);
         this.apartmentView.set_Visible(true);
         this.m_ApartmentNumberAddressPanel.set_Visible(true);
     }
 }
 public ApartmentAreaAddChangeForm(Apartment apart, ApartmentArea apartArea)
     : this()
 {
     this.m_Apartment = apart;
     this.m_ApartmentArea = apartArea;
     this.dbFromDateArea.Value = this.m_ApartmentArea.FromDate;
     this.nudTotalArea.set_Value(this.m_ApartmentArea.Total);
     this.nudLivingArea.set_Value(this.m_ApartmentArea.Living);
     this.nudHeatingArea.set_Value(this.m_ApartmentArea.Heating);
     this.nudBalconyArea.set_Value(this.m_ApartmentArea.Balcony);
     this.selectOrgDocument.SelectedOrgDocument = (this.m_ApartmentArea.DocId != 0L) ? OrgDocument.FindById(this.m_ApartmentArea.DocId) : OrgDocument.Null;
     this.btnAddChange.set_Text("Изменить");
 }
示例#15
0
 public ApartmentLinkView()
 {
     this.m_Apartment = Apartment.Null;
     this.InitializeComponent();
     this.dgvApartmentLinks.set_AutoGenerateColumns(false);
     if (!Manager.DesignMode)
     {
         bool flag;
         bool flag2;
         this.tsbDeleteApartmentLinks.set_Enabled(flag = User.IsMemberOf(RightsEnum.АРМБухгалтерЛСОбщееПолныйДоступ));
         this.tsbChangeApartmentLinks.set_Enabled(flag2 = flag);
         this.tsbAddApartmentLinks.set_Enabled(flag2);
     }
 }
 public void Fill(Apartment apartment)
 {
     if (apartment != this.m_Apartment)
     {
         this.m_Apartment = apartment ?? Apartment.Null;
         if (this.m_Apartment == Apartment.Null)
         {
             this.bsApartmentCanonicalTypes.Clear();
         }
         else
         {
             this.bsApartmentCanonicalTypes.set_DataSource(this.m_Apartment.GetFullApartmentCanonicalTypes());
         }
     }
 }
 public void Fill(Apartment apartment)
 {
     if (this.m_Apartment != apartment)
     {
         this.m_Apartment = apartment ?? Apartment.Null;
         if (this.m_Apartment == Apartment.Null)
         {
             this.Clear();
         }
         else
         {
             this.bsHouseCounterApartments.set_DataSource(this.m_Apartment.GetHouseCounterApartments());
             this.addressNameDataGridViewTextBoxColumn.set_Visible(false);
             this.apartmentNumberDataGridViewTextBoxColumn.set_Visible(false);
         }
     }
 }
示例#18
0
 public CreateAccountForm(Apartment apartment, string newAccountNumber, Account account)
     : this()
 {
     this.m_Apartment = apartment;
     this.m_NewAccountNumber = newAccountNumber;
     this.m_AccountView.DataSource = new Account();
     this.m_AccountView.DataSource.Number = this.m_NewAccountNumber;
     this.m_AccountView.DataSource.ApartmentId = this.m_Apartment.Id;
     this.m_AccountView.SetInvisibleCheckbox();
     if (account == null)
     {
         this.m_MoveAvances.set_Visible(false);
         this.m_MoveAvances.set_Checked(false);
         this.m_MoveActiveServices.set_Checked(false);
     }
     this.m_AccountView.FillLocalAddress(apartment);
 }
示例#19
0
 public static System.Data.DataRow GetApartmentAddress(Apartment apartment, bool normalizeFlat)
 {
     System.Data.DataRow row;
     System.Data.SqlClient.SqlParameter[] parameters = new System.Data.SqlClient.SqlParameter[2];
     parameters[0] = new System.Data.SqlClient.SqlParameter("@apartmentId", System.Data.SqlDbType.Decimal);
     parameters[0].set_Value((long) apartment.Id);
     parameters[1] = new System.Data.SqlClient.SqlParameter("@normalize_flat", System.Data.SqlDbType.Int);
     parameters[1].set_Value((bool) normalizeFlat);
     try
     {
         row = DALSql.ExecuteDataTable("\r\n\t\t\t\tselect sn.Setting_GetValue('SID','Код организации') org_code,\r\n\t\t\t\t\tsn.Setting_GetValue('SID','Наименование организации') org_name,\r\n\t\t\t\t\t(select max(f) from users where login_name=system_user) usr,\r\n\t\t\t\t\ta.number apartmentNumber,\r\n\t\t\t\t\tlaCity.name city,\r\n\t\t\t\t\tlaStreet.name street,\r\n\t\t\t\t\t'' t_street, \r\n\t\t\t\t\tlaHouse.name house,\r\n\t\t\t\t\t(case when (@normalize_flat=1) and (laFlat.name='1')\r\n\t\t\t\t\t\tand((select count(id) cnt from sn.LocalAddresses where parentId = laHouse.id)=1) then ''\t\t\r\n\t\t\t\t\t\telse laFlat.name \r\n\t\t\t\t\tend) flat\r\n\t\t\t\tfrom sn.Apartments a\r\n\t\t\t\t\tleft join sn.LocalAddresses la on (la.id = a.adrId)\r\n\t\t\t\t\tleft join sn.LocalAddresses laFlat on (la.level = 40 and la.id = laFlat.id)\r\n\t\t\t\t\tleft join sn.LocalAddresses laHouse on (laHouse.level = 30 and (la.id = laHouse.id or laFlat.parentId = laHouse.id))\r\n\t\t\t\t\tleft join sn.LocalAddresses laStreet on (laHouse.parentId = laStreet.id)\r\n\t\t\t\t\tleft join sn.LocalAddresses laCity on (laStreet.parentId = laCity.id)\r\n\t\t\t\twhere a.id=@apartmentId\r\n", parameters).Rows.get_Item(0);
     }
     catch (System.IndexOutOfRangeException exception)
     {
         throw new System.ApplicationException("Не удалось получить адрес данной квартиры", exception);
     }
     return row;
 }
示例#20
0
 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);
     }
 }
示例#21
0
 public ApartmentInfoView()
 {
     this.m_Apartment = Apartment.Null;
     this.m_Account = Account.Null;
     this.InitializeComponent();
     if (!Manager.DesignMode)
     {
         bool flag;
         bool flag2;
         bool flag3;
         bool flag4;
         bool flag5;
         bool flag6;
         this.button2.set_Enabled(flag = User.IsMemberOf(RightsEnum.АРМБухгалтерЛСОбщееПолныйДоступ));
         this.btnHouseApartmentType.set_Enabled(flag2 = flag);
         this.btnHistoryType.set_Enabled(flag3 = flag2);
         this.btnHistoryArea.set_Enabled(flag4 = flag3);
         this.btnChangeTypeConvenience.set_Enabled(flag5 = flag4);
         this.btnChangeApartment.set_Enabled(flag6 = flag5);
         this.btnApartmentTerritorialSubdivision.set_Enabled(flag6);
     }
 }
示例#22
0
 public ApartmentPropertyView(Apartment apartment)
     : this()
 {
     this.m_Apartment = apartment;
 }
示例#23
0
 public ApartmentPropertyView()
 {
     this.m_Apartment = Apartment.Null;
     this.InitializeComponent();
 }
示例#24
0
 public ApartmentNode(Apartment apartment)
 {
     base.set_Tag(apartment);
     base.set_Text(apartment.ToString());
 }
示例#25
0
 private void AddApartmment()
 {
     if (House.FindByAddress((LocalAddress) this.SelectedAddress.Parent) == House.Null)
     {
         LocalAddress.AddHouse((LocalAddress) this.SelectedAddress.Parent);
     }
     Apartment apartment = new Apartment {
         AdrId = this.SelectedAddress.Id
     };
     apartment.SetNewNumber();
     apartment.HouseId = (this.SelectedAddress.Level == AddressLevel.MaxAddress) ? this.SelectedAddress.GetParent().GetHouse().Id : this.SelectedAddress.GetHouse().Id;
     if (Apartment.IsExistNumber(apartment.Number))
     {
         Messages.ShowWarning("На этот адрес заведен паспорт квартиры. Попробуйте поменять номер имеющегося паспорта квартиры, чтобы избежать повторения номеров паспортов.");
     }
     else
     {
         apartment.SaveChanges();
         System.Windows.Forms.TreeNode node = new System.Windows.Forms.TreeNode(apartment.ToString());
         node.set_Tag(apartment);
         base.SelectedNode.Nodes.Add(node);
         base.SelectedNode.Expand();
         base.set_SelectedNode(node);
     }
 }
示例#26
0
 public void Fill(Account account, Apartment apartment, CalcHouseCounter calcHouseCounter)
 {
     bool flag = false;
     bool flag2 = false;
     bool flag3 = false;
     int num = 100;
     if (Setting.GetValueByName("Параметры расчетов", "Возможность сохранять перерасчеты как начисление").ToUpper() == "ДА")
     {
         flag3 = true;
     }
     if (Setting.GetValueByName("Параметры расчетов", "Возможность не учитывать перерасчеты при расчете ОДН").ToUpper() == "ДА")
     {
         flag = true;
     }
     if (Setting.GetValueByName("Параметры расчетов", "Возможность учета перерасчета в ЕПД за период перерасчета").ToUpper() == "ДА")
     {
         flag2 = true;
     }
     this.cbIsUseSaveRecalcAsCharge.set_Visible(flag3);
     this.cbIsUseNoticeRecalcUseByPeriod.set_Visible(flag2);
     this.cbIsUseRecalcHouseCounters.set_Visible(flag);
     this.tlpIsUseRecalc.ColumnStyles.Clear();
     if (flag3)
     {
         this.tlpIsUseRecalc.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30f));
         num = (int) (num - 30);
     }
     else
     {
         this.tlpIsUseRecalc.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 0f));
     }
     if (flag2)
     {
         this.tlpIsUseRecalc.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30f));
         num = (int) (num - 30);
     }
     else
     {
         this.tlpIsUseRecalc.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 0f));
     }
     if (flag)
     {
         this.tlpIsUseRecalc.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, (float) num));
     }
     else
     {
         this.tlpIsUseRecalc.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 0f));
     }
     if ((flag3 || flag) || flag2)
     {
         this.tlpIsUseRecalc.set_Visible(true);
     }
     else
     {
         this.tlpIsUseRecalc.set_Visible(false);
     }
     if ((account != null) && (((apartment != null) && (calcHouseCounter != null)) && (this.m_Account.Id != account.Id)))
     {
         this.m_Account = account;
         this.m_Apartment = apartment;
         this.selectTypeRecalc.Faset = FasetsEnum.RecalcTypes;
         this.selectTypeRecalc.RefreshValuesWithNull();
         this.Clear();
     }
 }
 public void Fill(Apartment apartment)
 {
     this.m_Apartment = apartment;
     this.RefreshControl();
 }
 public PersonFamilyAddChangeForm(PersonFamily personFamily, Apartment apartment)
     : this()
 {
     this.m_PersonFamily = personFamily;
     this.m_Apartment = apartment;
 }
 public PersonFamilyAddChangeForm()
 {
     this.m_PersonFamily = PersonFamily.Null;
     this.m_Apartment = Apartment.Null;
     this.InitializeComponent();
 }
 public void Fill(Apartment apartment, long servTypeId, int sealId, int plombId, int indicationId)
 {
     if (apartment == null)
     {
         this.bsApartmentCounters.Clear();
         this.m_Tabs.set_Visible(false);
     }
     else
     {
         this.m_servType = servTypeId;
         this.m_sealId = sealId;
         this.m_plombId = plombId;
         this.m_indicationId = indicationId;
         this.m_Tabs.set_Visible(true);
         if (this.m_Apartment.Id != apartment.Id)
         {
             this.m_Apartment = apartment;
             this.UpdateBindingSourceApartmentCounters();
         }
     }
 }