public virtual void Fill(System.Collections.Generic.IList<AccountServiceTariffNormView> houses, ServiceType serviceType)
 {
     this.bsAccountServiceTariffNorms.Clear();
     this.bsAccountServiceTariffNorms.set_DataSource(houses);
     this.dgvAccountServiceTariffs.set_DataSource(false);
     this.bsAccountServiceTariffNorms.EndEdit();
     this.bsAccountServiceTariffNorms.set_DataSource(houses);
     this.dgvAccountServiceTariffs.set_DataSource(this.bsAccountServiceTariffNorms);
     this.mServiceType = serviceType;
     foreach (System.Windows.Forms.DataGridViewRow row in (System.Collections.IEnumerable) this.dgvAccountServiceTariffs.Rows)
     {
         AccountServiceTariffNormView view = row.get_DataBoundItem() as AccountServiceTariffNormView;
         if ((view.TariffId == House.Null.Id) && (view.NormId == House.Null.Id))
         {
             row.DefaultCellStyle.set_BackColor(System.Drawing.Color.LightGray);
         }
     }
 }
 public ChangeAdditionalServiceTariffForm(ObjectList<Service> services, System.Data.DataTable m_dtSerficeTariffType, Organization m_provider, Organization m_resource, Organization m_holder, ServiceType m_serviceType, bool m_isSeason, bool m_isOpenServicesForArea, Area m_area, System.Data.DataTable m_dtCanonicalProperties, bool m_isOpen, System.DateTime m_dateLastTariff, int m_houseYear)
 {
     this.m_Services = new ObjectList<Service>();
     this.dtSerficeTariffType = new System.Data.DataTable();
     this.InitializeComponent();
     this.m_Services = services;
     this.dtSerficeTariffType = m_dtSerficeTariffType;
     this.provider = m_provider;
     this.resource = m_resource;
     this.holder = m_holder;
     this.serviceType = m_serviceType;
     this.isSeason = m_isSeason;
     this.isOpenServicesForArea = m_isOpenServicesForArea;
     this.area = m_area;
     this.dtCanonicalProperties = m_dtCanonicalProperties;
     this.isOpen = m_isOpen;
     this.dateLastTariff = m_dateLastTariff;
     this.houseYear = m_houseYear;
 }
 public void ServicesTableUpdate(ObjectList<Service> services, bool loadNewRateColumn, System.Data.DataTable m_dtSerficeNormTypes, System.Data.DataTable m_dtSerficeNormTypesByProperty, Organization m_provider, Organization m_resource, Organization m_holder, ServiceType m_serviceType, bool m_isSeason, bool m_isOpenServicesForArea, Area m_area, System.Data.DataTable m_dtCanonicalProperties, bool m_isOpen, System.DateTime m_dateLastTariff, int m_houseYear)
 {
     this.bsServices.set_DataSource(services);
     this.dtServiceNormTypes.Rows.Clear();
     this.dtServiceNormTypesByProperty.Rows.Clear();
     this.CreatedColumnTempTables();
     if (loadNewRateColumn)
     {
         this.NewRateColumn.set_Visible(true);
         this.Selected.set_Visible(false);
         this.tsbFindLike.set_Visible(true);
         this.tsbSelectedAll.set_Visible(false);
         this.SelectedServiceNormType.set_Visible(false);
         this.SelectedServiceNormTypeByProperty.set_Visible(false);
         if ((m_dtSerficeNormTypesByProperty != null) && (m_dtSerficeNormTypesByProperty.Rows.get_Count() != 0))
         {
             this.dtServiceNormTypesByProperty = m_dtSerficeNormTypesByProperty;
         }
         if ((m_dtSerficeNormTypes != null) && (m_dtSerficeNormTypes.Columns.get_Count() != 0))
         {
             this.dtServiceNormTypes = m_dtSerficeNormTypes;
         }
     }
     else
     {
         this.NewRateColumn.set_Visible(false);
         this.Selected.set_Visible(true);
         this.SelectedServiceNormType.set_Visible(true);
         this.SelectedServiceNormTypeByProperty.set_Visible(true);
         this.tsbFindLike.set_Visible(false);
         this.NewValueApartmentProperty.set_Visible(false);
         this.NewValueNorm.set_Visible(false);
         this.dgvServices.set_SelectionMode(System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect);
         this.dgvServiceNormTypes.set_SelectionMode(System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect);
         this.dgvServiceNormTypesByProperties.set_SelectionMode(System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect);
         this.tsbSelectedAll.set_Visible(true);
         this.dtServiceNormTypesByPropertySave = m_dtSerficeNormTypesByProperty;
         this.dtServiceNormTypesSave = m_dtSerficeNormTypes;
         this.tsbFindByTypeService.set_Visible(false);
         this.houseYear = m_houseYear;
         this.arrangeColorinfForDGCSerivces();
     }
     this.provider = m_provider;
     this.resource = m_resource;
     this.holder = m_holder;
     this.serviceType = m_serviceType;
     this.isSeason = m_isSeason;
     this.isOpenServicesForArea = m_isOpenServicesForArea;
     this.area = m_area;
     this.dtCanonicalProperties = m_dtCanonicalProperties;
     this.isOpen = m_isOpen;
     this.dateLastTariff = m_dateLastTariff;
     this.dgvServices.Sort(this.dgvServices.Columns.get_Item("TypeName"), ListSortDirection.Ascending);
     this.dgvServices.Sort(this.dgvServices.Columns.get_Item("lastRateDataGridViewTextBoxColumn"), ListSortDirection.Descending);
     this.UpdateServiceNorm((this.bsServices.get_Current() as Service) ?? Service.Null, true);
 }
 public virtual void Fill(System.Collections.Generic.IList<HouseWithServiceTariff> houses, ServiceType serviceType, ServiceOld service)
 {
     this.bsHouseWithServiceTariffs.set_DataSource(houses);
     this.mServiceType = serviceType;
     this.mService = service;
     foreach (System.Windows.Forms.DataGridViewRow row in (System.Collections.IEnumerable) this.dgvHouseServiceTariffs.Rows)
     {
         HouseWithServiceTariff tariff = row.get_DataBoundItem() as HouseWithServiceTariff;
         if ((tariff.TariffId == House.Null.Id) && (tariff.NormId == House.Null.Id))
         {
             row.DefaultCellStyle.set_BackColor(System.Drawing.Color.LightGray);
         }
     }
 }
 public void AddTariff(ServiceType serviceType, decimal rate, OrgDocument doc, System.DateTime date, long accountServiceId, System.DateTime toDate)
 {
     Mappers.AccountServiceTariffNormMapper.AddTariff(this, serviceType, rate, doc, date, accountServiceId, toDate);
 }
 public void AddNorm(ServiceType serviceType, decimal rate, OrgDocument doc, System.DateTime normDate, int unitId, int? byUnitId, decimal startValue, decimal endValue, long accountServiceId)
 {
     Mappers.AccountServiceTariffNormMapper.AddNorm(this, serviceType, rate, doc, normDate, unitId, byUnitId, startValue, endValue, accountServiceId);
 }
Example #7
0
 public static ObjectList<Service> FindByParameters(Organization provider, Organization resource, Organization holder, ServiceType serviceType, bool isSeason, bool isOpenServicesForArea, Area area, System.Data.DataTable dtCanonicalProperties, bool isOpen, System.DateTime dateLastTariff, int houseYear)
 {
     return Mappers.ServiceMapper.FindByParameters(provider, resource, holder, serviceType, isSeason, isOpenServicesForArea, area, dtCanonicalProperties, isOpen, dateLastTariff, houseYear);
 }
Example #8
0
 public void ServicesTableUpdate(ObjectList<Service> services, bool loadNewRateColumn, System.Data.DataTable m_dtSerficeTariffType, Organization m_provider, Organization m_resource, Organization m_holder, ServiceType m_serviceType, bool m_isSeason, bool m_isOpenServicesForArea, Area m_area, System.Data.DataTable m_dtCanonicalProperties, bool m_isOpen, System.DateTime m_dateLastTariff, int m_houseYear)
 {
     this.bsServices.set_DataSource(services);
     if (loadNewRateColumn)
     {
         this.NewRateColumn.set_Visible(true);
         this.Selected.set_Visible(false);
         this.SelectedServiceTariffType.set_Visible(false);
         this.tsbFindLike.set_Visible(true);
         this.NewServiceTypeTariffRateColumn.set_Visible(true);
         this.tsbSelectedAll.set_Visible(false);
     }
     else
     {
         this.NewRateColumn.set_Visible(false);
         this.Selected.set_Visible(true);
         this.SelectedServiceTariffType.set_Visible(true);
         this.tsbFindLike.set_Visible(false);
         this.NewServiceTypeTariffRateColumn.set_Visible(false);
         this.dgvServices.set_SelectionMode(System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect);
         this.dgvServiceTariffTypes.set_SelectionMode(System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect);
         this.tsbSelectedAll.set_Visible(true);
         this.dtSerficeTariffTypeSave = m_dtSerficeTariffType;
         this.tsbFindByTypeService.set_Visible(false);
         this.arrangeColorinfForDGCSerivces();
     }
     this.provider = m_provider;
     this.resource = m_resource;
     this.holder = m_holder;
     this.serviceType = m_serviceType;
     this.isSeason = m_isSeason;
     this.isOpenServicesForArea = m_isOpenServicesForArea;
     this.area = m_area;
     this.dtCanonicalProperties = m_dtCanonicalProperties;
     this.isOpen = m_isOpen;
     this.dateLastTariff = m_dateLastTariff;
     this.dtSerficeTariffTypeSave = m_dtSerficeTariffType;
     this.houseYear = m_houseYear;
     if (this.dtSerficeTariffTypeSave != null)
     {
         Mappers.ServiceMapper.FindServiceBySerficeTariffTypeAndParameters(this.dtSerficeTariffTypeSave, this.provider, this.resource, this.holder, this.serviceType, this.isSeason, this.isOpenServicesForArea, this.area, this.dtCanonicalProperties, this.isOpen, this.dateLastTariff, this.houseYear);
     }
     this.flag = false;
     this.dgvServices.Sort(this.dgvServices.Columns.get_Item("TypeName"), ListSortDirection.Ascending);
     this.dgvServices.Sort(this.dgvServices.Columns.get_Item("lastRateDataGridViewTextBoxColumn"), ListSortDirection.Descending);
     this.UpdateBsServiceTariffTypes((this.bsServices.get_Current() as Service) ?? Service.Null, true);
     this.flag = true;
 }
 private void RefreshDependences()
 {
     if (this.radioParentGroup.get_Checked())
     {
         ServiceType type = this.bsParentServiceTypes.get_Current() as ServiceType;
         FasetItem selectedFasetItem = this.cbTypeGroup.SelectedFasetItem;
         if (selectedFasetItem != FasetItem.Null)
         {
             this.bsUndependedServiceType.set_DataSource(type.GetUndependedServiceTypes(selectedFasetItem.Id));
             this.bsDependedServiceTypes.set_DataSource(type.GetDependedServiceTypes(selectedFasetItem.Id));
         }
     }
     else if (this.radioExistingGroups.get_Checked())
     {
         if (this.combGroupName.Items.get_Count() <= 0)
         {
             this.bsUndependedServiceType.set_DataSource(ServiceType.GetAllSort());
             this.bsDependedServiceTypes.set_DataSource(new ServiceType());
         }
         else
         {
             ServiceType type2 = new ServiceType();
             FasetItem item2 = this.cbTypeGroup.SelectedFasetItem;
             if (item2 != FasetItem.Null)
             {
                 string name = this.combGroupName.get_Text().Substring((int) (this.combGroupName.get_Text().IndexOf('.') + 1));
                 int code = System.Convert.ToInt32(this.combGroupName.get_Text().Substring(0, this.combGroupName.get_Text().IndexOf('.')));
                 this.bsUndependedServiceType.set_DataSource(type2.GetUndependedServiceTypesByTypeIdGroupCodeName(item2.Id, code, name));
                 this.bsDependedServiceTypes.set_DataSource(type2.GetDependedServiceTypesByTypeIdGroupCodeName(item2.Id, code, name));
             }
         }
     }
     else
     {
         this.bsUndependedServiceType.set_DataSource(ServiceType.GetAllSort());
         this.bsDependedServiceTypes.set_DataSource(new ServiceType());
     }
 }
 public void Fill(House h)
 {
     if ((h != House.Null) && (h != null))
     {
         this.m_House = h;
         ObjectList<Service> list = new ObjectList<Service>();
         list = Mappers.ServiceMapper.FindByHouseId(this.m_House.Id);
         this.tscbServices.ComboBox.set_DataSource(list);
         this.tscbServices.ComboBox.set_DisplayMember("ShortName");
         this.tscbServices.ComboBox.set_ValueMember("id");
         this.tscbServices.set_SelectedIndex(-1);
         this.tscbServices.ComboBox.set_Text("<не выбрано>");
         ServiceType type = new ServiceType {
             Id = 0L,
             ShortName = "<не выбрано>"
         };
         System.Collections.Generic.List<FasetItem> list2 = new System.Collections.Generic.List<FasetItem>();
         foreach (FasetItem item in FasetItemMapper.FindByFasetName("Тип прибора учета").Values)
         {
             list2.Add(item);
         }
         this.tscbCounters.ComboBox.set_DataSource(list2);
         this.tscbCounters.ComboBox.set_DisplayMember("name");
         this.tscbCounters.ComboBox.set_ValueMember("id");
         this.tscbCounters.set_SelectedIndex(-1);
         this.tscbCounters.ComboBox.set_Text("<не выбрано>");
         ObjectList<ServiceType> serviceTypeContextByCounter = new ObjectList<ServiceType>();
         serviceTypeContextByCounter = ServiceType.GetServiceTypeContextByCounter();
         this.tscbTypeServices.ComboBox.Items.Clear();
         this.tscbTypeServices.ComboBox.Items.Add(type);
         foreach (ServiceType type2 in serviceTypeContextByCounter)
         {
             this.tscbTypeServices.ComboBox.Items.Add(type2);
         }
         this.tscbTypeServices.ComboBox.set_DisplayMember("ShortName");
         this.tscbTypeServices.ComboBox.set_ValueMember("id");
         this.tscbTypeServices.set_SelectedIndex(0);
         this.bsApartmentCounters.set_DataSource(null);
         this.tsbSearchAllServices.set_Checked(false);
         this.tsbSelectBidning.set_Checked(false);
         this.tsbSelectNotBinding.set_Checked(false);
         this.tsbCurrentCounters.set_Checked(true);
         this.tsbAllCounters.set_Checked(false);
     }
 }