public HouseCounterApartmentAddChangeForm()
 {
     this.m_HouseCounter = HouseCounter.Null;
     this.m_HouseCounterApartment = HouseCounterApartment.Null;
     this.m_Apartment = Apartment.Null;
     this.InitializeComponent();
 }
 public HouseCounterAddChangeForm(long houseId, HouseCounter hc, HouseCounterIndication hciFrom, HouseCounterIndication hciTo)
     : this()
 {
     this.m_HouseId = houseId;
     this.m_HouseCounter = hc;
     this.m_HouseCounterFromIndication = (hciFrom == HouseCounterIndication.Null) ? new HouseCounterIndication() : hciFrom;
     this.m_HouseCounterToIndication = (hciTo == HouseCounterIndication.Null) ? new HouseCounterIndication() : hciTo;
     if (this.m_HouseCounter != HouseCounter.Null)
     {
         this.cbStatusASKUPE.Faset = FasetsEnum.StatusASKUPE;
         this.cbStatusASKUPE.RefreshValuesWithNull();
         this.cbStatusASKUPE.set_SelectedItem(FasetItem.FindById(hc.StatusAscupe));
         this.selectType.Faset = FasetsEnum.CounterTypes;
         this.selectType.RefreshValues();
         this.selectType.set_Text(this.m_HouseCounter.TypeCounterName);
         this.tbCounterName.set_Text(this.m_HouseCounter.CounterName);
         this.tbCounterNumber.set_Text(this.m_HouseCounter.CounterNumber);
         this.tbNote.set_Text(this.m_HouseCounter.Note);
         this.tbCodeASKUPE.set_Text(this.m_HouseCounter.PointAccounting);
         this.nudCapacity.set_Value((decimal) this.m_HouseCounter.Capacity);
         this.cbMark.set_DataSource(CounterMark.FindAll());
         foreach (CounterMark mark in this.cbMark.Items)
         {
             if (mark.Id == this.m_HouseCounter.MarkId)
             {
                 this.cbMark.set_SelectedItem(mark);
             }
         }
         this.chbIsInternal.set_Checked(this.m_HouseCounter.IsInternal);
         this.dbFromDate.Value = this.m_HouseCounter.FromDate;
         this.dbToDate.Value = this.m_HouseCounter.ToDate;
         this.nudFactor.set_Value(this.m_HouseCounter.Factor);
         this.btnAddChange.set_Text("Изменить");
     }
 }
 public HistoryHouseCounterAreasForm(House house, HouseCounter houseCounter)
 {
     this.m_House = house;
     this.m_houseCounter = houseCounter;
     this.InitializeComponent();
     this.historyHouseCounterAreasView1.Fill(this.m_House, this.m_houseCounter);
 }
 public HomeCountersIndicationAddChangeForm(HouseCounter counter)
     : this()
 {
     this.m_counter = counter;
     this.btnAddChange.set_Text("Добавить");
     this.set_Text("Добавление показаний счетчика");
 }
 public void Clear()
 {
     this.IsChangedLinkage = false;
     this.m_counter = HouseCounter.Null;
     this.bsHouseApartmentCountersLinkage.set_Sort((string) null);
     this.bsHouseApartmentCountersLinkage.set_DataSource(null);
 }
 public HouseCounterHierarchyAddChangeForm()
 {
     this.m_HouseCounter = HouseCounter.Null;
     this.m_HouseCounterHierarchy = HouseCounterHierarchy.Null;
     this.InitializeComponent();
     this.typeName.Faset = FasetsEnum.TypeHouseCounterRelation;
     this.typeName.RefreshValues();
 }
 public HouseCounterAddChangeForm()
 {
     this.m_HouseCounter = HouseCounter.Null;
     this.m_HouseCounterFromIndication = HouseCounterIndication.Null;
     this.m_HouseCounterToIndication = HouseCounterIndication.Null;
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
 }
 public void Fill(HouseCounter houseCounter)
 {
     if (houseCounter != this.m_HouseCounter)
     {
         this.m_HouseCounter = houseCounter;
         this.set_Font(Manager.WindowFont);
         this.bsHouseCounterServices.set_DataSource(this.m_HouseCounter.GetHouseCounterServices());
     }
 }
 public void Fill(HouseCounter counter)
 {
     this.m_counter = counter ?? HouseCounter.Null;
     if ((this.m_counter != HouseCounter.Null) && (this.m_counter != null))
     {
         this.bsHouseCounterIndication.set_DataSource(HouseCounterIndication.FindByCounterId(this.m_counter.Id));
         this.bsHouseCounterIndication.set_Sort("ValDate desc");
     }
 }
 public void Fill(AIS.SN.Model.DomainObjects.House h, HouseCounter hc)
 {
     if (((h != AIS.SN.Model.DomainObjects.House.Null) && (h != null)) && (hc != null))
     {
         this.m_House = h;
         this.m_HouseCounter = hc;
         this.bsHouseCounterAreas.set_DataSource(HouseCounterArea.FindAllByHouseCounterId(this.m_HouseCounter.Id));
     }
 }
 public void Fill(HouseCounter counter)
 {
     this.set_Font(Manager.WindowFont);
     this.IsChangedLinkage = false;
     this.m_counter = counter ?? HouseCounter.Null;
     if (this.m_counter != HouseCounter.Null)
     {
         this.bsHouseApartmentCountersLinkage.set_DataSource(HouseApartmentCounter.FindByHouseCounterId(this.m_counter.Id));
         this.bsHouseApartmentCountersLinkage.set_Sort("addressName, fromDate desc");
     }
 }
Esempio n. 12
0
 public void Fill(HouseCounter houseCounter)
 {
     if (this.m_HouseCounter != houseCounter)
     {
         this.m_HouseCounter = houseCounter;
         if (this.m_HouseCounter == HouseCounter.Null)
         {
             this.bsHouseCounterHierarchy.Clear();
         }
         else
         {
             this.bsHouseCounterHierarchy.set_DataSource(this.m_HouseCounter.GetHouseCounterHierarchy());
         }
     }
 }
 public void Clear()
 {
     this.m_houseCounter = HouseCounter.Null;
     this.bsApartmentCounterShares.set_Sort((string) null);
     this.bsApartmentCounterShares.set_DataSource(null);
     this.bsApartmentCountersShareDates.Clear();
     this.tbCountResidents.Clear();
     this.tbTotalAreas.Clear();
     this.tbCountResidentsContrary.Clear();
     this.tbTotalAreasContrary.Clear();
     this.IncorrectlySumShare();
     this.tsbManualCalculation.set_Visible(false);
     this.cbxDates.set_Visible(false);
     this.toolStripSeparator1.set_Visible(false);
     this.toolStripSeparator2.set_Visible(false);
 }
 public HomeCountersIndicationAddChangeForm(HouseCounter counter, HouseCounterIndication indication)
     : this()
 {
     this.m_counter = counter;
     this.m_indication = indication;
     this.btnAddChange.set_Text("Изменить");
     this.set_Text("Изменение показаний счетчика");
     this.tbVal.set_Text(this.m_indication.Val.ToString());
     this.tbValInfo.set_Text(this.m_indication.ValInfo.ToString());
     this.dbValDate.Value = this.m_indication.ValDate;
     this.tbValDop.set_Text(this.m_indication.ValDop.ToString());
     this.tbSquare.set_Text(this.m_indication.HouseSquare.ToString());
     this.selectValType.set_Text(this.m_indication.ValTypeName);
     this.typeName.set_Text(this.m_indication.TypeName);
     this.cbNegative.set_Checked(this.m_indication.IsUseNegativeValue);
     this.tbLimit.set_Text(this.m_indication.LimitFactor.ToString());
     this.tbNote.set_Text(this.m_indication.Note);
 }
 public void Clear()
 {
     this.m_counter = HouseCounter.Null;
     this.bsHouseCounterIndication.set_Sort((string) null);
     this.bsHouseCounterIndication.set_DataSource(null);
 }
Esempio n. 16
0
 public ReportByHouseCountersForm(HouseCounter houseCounter)
     : this()
 {
     this.m_HouseCounter = houseCounter;
 }
Esempio n. 17
0
 public ReportByHouseCountersForm()
 {
     this.m_HouseCounter = HouseCounter.Null;
     this.InitializeComponent();
 }
Esempio n. 18
0
 private void btnAddChange_Click(object sender, System.EventArgs e)
 {
     BalloonWindow window;
     ServiceTypeOld old = (this.bsServiceTypes.get_Current() as ServiceTypeOld) ?? ServiceTypeOld.Null;
     if (string.IsNullOrEmpty(this.selectType.get_Text()) || string.IsNullOrEmpty(this.tbCounterName.get_Text()))
     {
         window = new BalloonWindow("Не все поля заполнены.");
         window.Show(this.btnAddChange);
     }
     else if (this.dbFromDate.IsNull)
     {
         window = new BalloonWindow("Не введена дата открытия.");
         window.Show(this.btnAddChange);
     }
     else if (((int) this.nudCapacity.Value) <= 0)
     {
         window = new BalloonWindow("Разрядность должна быть больше 0.");
         window.Show(this.btnAddChange);
     }
     else if (old == ServiceTypeOld.Null)
     {
         window = new BalloonWindow("Выберите тип услуги");
         window.Show(this.btnAddChange);
     }
     else
     {
         long num;
         if (!string.IsNullOrEmpty(this.tbCodeASKUPE.get_Text()) && !long.TryParse(this.tbCodeASKUPE.get_Text(), ref num))
         {
             new BalloonWindow("Код АСКУПЭ должен содержать только цифры").Show(this.btnAddChange);
         }
         else
         {
             if ((this.m_HouseCounter == null) || (this.m_HouseCounter == HouseCounter.Null))
             {
                 this.m_HouseCounter = new HouseCounter();
                 this.m_HouseCounter.HouseId = this.m_HouseId;
             }
             bool flag1 = this.m_HouseCounter.FromDate != this.dbFromDate.Value;
             bool flag2 = this.m_HouseCounter.ToDate != this.dbToDate.Value;
             this.m_HouseCounter.FromDate = this.dbFromDate.Value;
             if (!this.dbToDate.IsNull)
             {
                 this.m_HouseCounter.ToDate = this.dbToDate.Value;
             }
             this.m_HouseCounter.TypeCounterName = this.selectType.SelectedFasetItem.ToString();
             this.m_HouseCounter.TypeCounterId = this.selectType.SelectedFasetItem.Id;
             this.m_HouseCounter.CounterName = this.tbCounterName.get_Text();
             this.m_HouseCounter.CounterNumber = this.tbCounterNumber.get_Text();
             this.m_HouseCounter.Capacity = (int) this.nudCapacity.Value;
             this.m_HouseCounter.MarkId = (this.cbMark.get_SelectedItem() as CounterMark).Id;
             this.m_HouseCounter.FromDate = this.dbFromDate.Value;
             this.m_HouseCounter.ToDate = this.dbToDate.Value;
             this.m_HouseCounter.ServiceTypeId = old.Id;
             this.m_HouseCounter.Factor = this.nudFactor.Value;
             this.m_HouseCounter.StatusAscupe = (this.cbStatusASKUPE.get_SelectedItem() as FasetItem).Id;
             this.m_HouseCounter.PointAccounting = this.tbCodeASKUPE.get_Text();
             this.m_HouseCounter.IsInternal = this.chbIsInternal.get_Checked();
             bool isNew = this.m_HouseCounter.IsNew;
             this.m_HouseCounter.Note = this.tbNote.get_Text();
             this.m_HouseCounter.SaveChanges();
             this.m_HouseCounter.ServiceTypeCode = (int) ((int) old.Code);
             this.m_HouseCounter.ServiceTypeName = old.ShortName;
             if (isNew)
             {
                 this.m_HouseCounterFromIndication.CounterId = this.m_HouseCounter.Id;
                 this.m_HouseCounterFromIndication.ValDate = this.dbFromDate.Value;
                 this.m_HouseCounterFromIndication.ValTypeName = "Начальное";
                 HomeCountersIndicationAddChangeForm form = new HomeCountersIndicationAddChangeForm(this.m_HouseCounter, this.m_HouseCounterFromIndication, true);
                 form.ShowDialog(this);
             }
             else if (!this.m_HouseCounterFromIndication.IsNew && (this.m_HouseCounterFromIndication.ValDate != this.dbFromDate.Value))
             {
                 this.m_HouseCounterFromIndication.ValDate = this.dbFromDate.Value;
                 this.m_HouseCounterFromIndication.SaveChanges();
             }
             if (!this.dbToDate.IsNull)
             {
                 this.m_HouseCounterToIndication.CounterId = this.m_HouseCounter.Id;
                 this.m_HouseCounterToIndication.ValDate = this.dbToDate.Value;
                 this.m_HouseCounterToIndication.ValTypeName = "Конечное";
                 new HomeCountersIndicationAddChangeForm(this.m_HouseCounter, this.m_HouseCounterToIndication, true).ShowDialog(this);
             }
             else if ((this.m_HouseCounterToIndication != null) && (this.m_HouseCounterToIndication != HouseCounterIndication.Null))
             {
                 this.m_HouseCounterToIndication.Delete();
             }
             base.set_DialogResult(System.Windows.Forms.DialogResult.OK);
             base.Close();
         }
     }
 }
 public void Clear()
 {
     this.m_HouseCounter = HouseCounter.Null;
     this.m_Apartment = Apartment.Null;
     this.bsHouseCounterApartments.Clear();
 }
Esempio n. 20
0
 public void Clear()
 {
     this.m_HouseCounter = HouseCounter.Null;
     this.bsHouseCounterServices.Clear();
 }
 public HouseCounterHierarchyAddChangeForm(HouseCounter houseCounter)
     : this()
 {
     this.m_HouseCounter = houseCounter;
 }
Esempio n. 22
0
 private void tsbCounterChange_Click(object sender, System.EventArgs e)
 {
     if (System.Windows.Forms.Application.OpenForms.get_Item(0).GetType().ToString() == "AIS.SN.UI.Provider.ProviderMainForm")
     {
         string valueByName = Setting.GetValueByName("Работа с приборами учета", "Диапазон в который разрешено редактирование в Поставщике");
         if ((System.Convert.ToInt32(valueByName.Substring(0, valueByName.IndexOf('-'))) > System.DateTime.Now.get_Day()) || (System.Convert.ToInt32(valueByName.Substring((int) (valueByName.IndexOf('-') + 1), (int) ((valueByName.get_Length() - valueByName.IndexOf('-')) - 1))) < System.DateTime.Now.get_Day()))
         {
             System.Windows.Forms.MessageBox.Show(string.Concat((string[]) new string[] { "Вам разрешено редактирование данных только с ", valueByName.Substring(0, valueByName.IndexOf('-')), " по ", valueByName.Substring((int) (valueByName.IndexOf('-') + 1), (int) ((valueByName.get_Length() - valueByName.IndexOf('-')) - 1)), " числа месяца" }), "Редактирование запрещено", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Hand);
             return;
         }
     }
     if (this.m_House != House.Null)
     {
         this.m_HouseCounter = this.bsHouseCounters.get_Current() as HouseCounter;
         if ((this.m_HouseCounter != null) && (this.m_HouseCounter != HouseCounter.Null))
         {
             HouseCounterAddChangeForm form = new HouseCounterAddChangeForm(this.m_House.Id, this.m_HouseCounter, HouseCounterIndication.FindByTypeNameCounterId(this.m_HouseCounter.Id, "Начальное"), HouseCounterIndication.FindByTypeNameCounterId(this.m_HouseCounter.Id, "Конечное"));
             form.set_Text("Изменение счетчика");
             if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
             {
                 this.m_StreetId = 0L;
                 this.UpdateTableCollectivCounters();
                 this.homePassportCollectiveCountersTotalInfo1.Fill(this.m_HouseCounter);
             }
         }
     }
 }
Esempio n. 23
0
 private void tsbCounterDelete_Click(object sender, System.EventArgs e)
 {
     if (System.Windows.Forms.Application.OpenForms.get_Item(0).GetType().ToString() == "AIS.SN.UI.Provider.ProviderMainForm")
     {
         string valueByName = Setting.GetValueByName("Работа с приборами учета", "Диапазон в который разрешено редактирование в Поставщике");
         if ((System.Convert.ToInt32(valueByName.Substring(0, valueByName.IndexOf('-'))) > System.DateTime.Now.get_Day()) || (System.Convert.ToInt32(valueByName.Substring((int) (valueByName.IndexOf('-') + 1), (int) ((valueByName.get_Length() - valueByName.IndexOf('-')) - 1))) < System.DateTime.Now.get_Day()))
         {
             System.Windows.Forms.MessageBox.Show(string.Concat((string[]) new string[] { "Вам разрешено редактирование данных только с ", valueByName.Substring(0, valueByName.IndexOf('-')), " по ", valueByName.Substring((int) (valueByName.IndexOf('-') + 1), (int) ((valueByName.get_Length() - valueByName.IndexOf('-')) - 1)), " числа месяца" }), "Редактирование запрещено", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Hand);
             return;
         }
     }
     if ((this.bsHouseCounters.get_Current() != null) && (Messages.QuestionYesNo(this, "Вы действительно хотите удалить?") != System.Windows.Forms.DialogResult.No))
     {
         this.m_HouseCounter = this.bsHouseCounters.get_Current() as HouseCounter;
         if ((this.m_HouseCounter != null) && (this.m_HouseCounter != HouseCounter.Null))
         {
             try
             {
                 if (Messages.QuestionYesNo(this, "Удалить подчиненные коллективные счетчики?") == System.Windows.Forms.DialogResult.No)
                 {
                     this.m_HouseCounter.Delete();
                 }
                 else
                 {
                     this.m_HouseCounter.DeleteWithCildren();
                 }
             }
             finally
             {
                 this.m_StreetId = 0L;
                 this.UpdateTableCollectivCounters();
             }
         }
     }
 }
 public HouseApartmentCounterDistributionSharesAutoCalculationForm()
 {
     this.m_houseCounter = HouseCounter.Null;
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
 }
 public void Fill(HouseCounter houseCounter)
 {
     if (this.m_HouseCounter != houseCounter)
     {
         this.m_HouseCounter = houseCounter ?? HouseCounter.Null;
         if (this.m_HouseCounter == HouseCounter.Null)
         {
             this.Clear();
         }
         else
         {
             this.bsHouseCounterApartments.set_DataSource(this.m_HouseCounter.GetHouseCounterApartments());
             this.CounterNameDataGridViewTextBoxColumn.set_Visible(false);
             this.counterToDateDataGridViewTextBoxColumn.set_Visible(false);
             this.counterFromDateDataGridViewTextBoxColumn.set_Visible(false);
         }
     }
 }
Esempio n. 26
0
 private void toolStripButton1_Click(object sender, System.EventArgs e)
 {
     this.m_HouseCounter = (this.bsHouseCounters.get_Current() as HouseCounter) ?? HouseCounter.Null;
     if (this.m_HouseCounter == HouseCounter.Null)
     {
         System.Windows.Forms.MessageBox.Show("Вы не выбрали коллективный счетчик!");
     }
     else
     {
         new ReportByHouseCountersForm(this.m_HouseCounter).ShowDialog(this);
     }
 }
 public HomeCountersIndicationAddChangeForm(HouseCounter counter, HouseCounterIndication indication, bool fix)
     : this(counter, indication)
 {
     if (fix)
     {
         this.m_Fix = (this.m_indication.ValTypeName == "Конечное") ? ((bool) true) : ((bool) (this.m_indication.ValTypeName == "Начальное"));
         if (this.m_Fix)
         {
             this.selectValType.set_Enabled(false);
             this.dbValDate.set_Enabled(false);
             this.btnCancel.set_Enabled(false);
         }
         if (indication.IsNew)
         {
             this.btnAddChange.set_Text("Добавить");
             this.set_Text("Добавление показаний счетчика");
         }
         else
         {
             this.btnAddChange.set_Text("Изменить");
             this.set_Text("Изменение показаний счетчика");
         }
     }
 }
 public HouseCounterApartmentAddChangeForm(HouseCounter houseCounter)
     : this()
 {
     this.m_HouseCounter = houseCounter;
 }
 public void Fill(HouseCounter houseCounter)
 {
     this.set_Font(Manager.WindowFont);
     this.m_houseCounter = houseCounter ?? HouseCounter.Null;
     this.UpdateBindingSourceApartmentCountersShareDates();
     this.IncorrectlySumShare();
 }
 public HouseApartmentCounterDistributionSharesAutoCalculationForm(HouseCounter houseCounter, System.DateTime dateTime)
     : this()
 {
     this.m_houseCounter = houseCounter;
     this.dbFromDate.Value = dateTime;
 }