Esempio n. 1
0
 public RemitteeServiceForm()
 {
     this.m_service = new ServiceOld();
     this.m_remittee = new Remittee();
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
 }
 protected override void Fill(ObjectWithId obj)
 {
     this.serviceOld = (ServiceOld) obj;
     this.serviceNormBenefitBindingSource.set_DataSource(this.serviceOld.NormBenefits);
     this.serviceNormBenefits.AddRange(this.serviceOld.NormBenefits);
     this.set_Dock(System.Windows.Forms.DockStyle.Fill);
 }
Esempio n. 3
0
 public Service2AddForm(ServiceOld serviceOld)
     : this()
 {
     if ((serviceOld != null) && (serviceOld != ServiceOld.Null))
     {
         this._mServiceOld = serviceOld;
     }
 }
Esempio n. 4
0
 public RemitteeServiceAddForm()
 {
     this.organization = new Organization();
     this.doc = new OrgDocument();
     this.m_serviceOld = new ServiceOld();
     this.InitializeComponent();
     base.get_DesignMode();
 }
Esempio n. 5
0
 public RemitteeServiceView()
 {
     this.m_service = new ServiceOld();
     this.InitializeComponent();
     if (!base.get_DesignMode())
     {
         this.set_Font(Manager.WindowFont);
     }
 }
Esempio n. 6
0
 public ServiceCalcAlgAddForm(ServiceCalcAlg ServiceCalcAlg, ServiceOld serviceOld)
     : this()
 {
     this.m_ServiceCalcAlg = ServiceCalcAlg;
     this.m_serviceOld = serviceOld;
     this.m_calcAlg = CalcAlg.FindById(this.m_ServiceCalcAlg.CalcAlgId);
     this.tbFormula.set_Text(this.m_ServiceCalcAlg.Formula);
     this.tbProcName.set_Text(this.m_ServiceCalcAlg.ProcName);
     this.dbFromDate.Value = this.m_ServiceCalcAlg.FromDate;
     this.bnOk.set_Text("Изменить");
     this.set_Text("Изменить алгоритм");
 }
 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 void Execute(ServiceOld serviceOld, FixedSummServiceView view)
 {
     System.Data.SqlClient.SqlParameter[] parameters = new System.Data.SqlClient.SqlParameter[6];
     parameters[0] = new System.Data.SqlClient.SqlParameter("@accountId", System.Data.SqlDbType.BigInt);
     parameters[0].set_Value((long) view.AccountId);
     parameters[1] = new System.Data.SqlClient.SqlParameter("@serviceId", System.Data.SqlDbType.BigInt);
     parameters[1].set_Value((long) serviceOld.Id);
     parameters[2] = new System.Data.SqlClient.SqlParameter("@accountServiceId", System.Data.SqlDbType.BigInt);
     parameters[2].set_Value((view.AccountServiceId == 0L) ? ((object) System.DBNull.Value) : ((object) ((long) view.AccountServiceId)));
     parameters[3] = new System.Data.SqlClient.SqlParameter("@fromDate", System.Data.SqlDbType.DateTime);
     parameters[3].set_Value(view.FromDate);
     parameters[4] = new System.Data.SqlClient.SqlParameter("@monthCount", System.Data.SqlDbType.Int);
     parameters[4].set_Value((int) view.MonthCount);
     parameters[5] = new System.Data.SqlClient.SqlParameter("@chargeSumm", System.Data.SqlDbType.Decimal);
     parameters[5].set_Value(view.ChargeSumm);
     DALSql.ExecuteNonQuery("exec sn.GroupOperation_FixedSummService @accountId,@serviceId,@accountServiceId,@fromDate,@monthCount,@chargeSumm", parameters);
 }
Esempio n. 9
0
 public ServiceCalcAlgsView(ServiceOld service)
     : this()
 {
     this.m_service = service;
 }
Esempio n. 10
0
 public ServiceNormView(AIS.SN.Model.DomainObjects.ServiceOld serviceOld)
 {
     this.InitializeComponent();
     this.ServiceOld = serviceOld;
 }
Esempio n. 11
0
 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);
         }
     }
 }
 private bool FormValidated(System.Windows.Forms.Button btn)
 {
     ObjectList<LocalAddress> selectedAddresses = ((OperationGroupForm) base.Parent.Parent.Parent.Parent.Parent).GetSelectedAddresses();
     this.serviceOld = ((ServiceOld) this.bsServices.get_Current()) ?? ServiceOld.Null;
     this.oldFromDate = this.dbxOldFromDate.IsNull ? Constants.NullDate : this.dbxOldFromDate.Value;
     this.oldToDate = this.dbxOldToDate.IsNull ? Constants.NullDate : this.dbxOldToDate.Value;
     this.newFromDate = this.dbxNewFromDate.IsNull ? Constants.NullDate : this.dbxNewFromDate.Value;
     this.newToDate = this.dbxNewToDate.IsNull ? Constants.NullDate : this.dbxNewToDate.Value;
     string text = string.Empty;
     if (!this.chIsNewFromDate.get_Checked() && !this.chIsNewToDate.get_Checked())
     {
         text = text + "Выберите какие даты необходимо изменить" + System.Environment.get_NewLine();
     }
     if (this.chIsOldFromDate.get_Checked() && (this.oldFromDate == Constants.NullDate))
     {
         text = text + "Введите старую дату открытия услуги" + System.Environment.get_NewLine();
     }
     if (this.chIsNewFromDate.get_Checked() && (this.newFromDate == Constants.NullDate))
     {
         text = text + "Введите новую дату открытия услуги" + System.Environment.get_NewLine();
     }
     if (this.serviceOld == ServiceOld.Null)
     {
         text = text + "Выберите услугу" + System.Environment.get_NewLine();
     }
     if ((this.selectOrgDocument.SelectedOrgDocument ?? OrgDocument.Null) == OrgDocument.Null)
     {
         text = text + "Выберите документ для перерасчета";
     }
     if (text != string.Empty)
     {
         BalloonWindow.Show(btn, text);
         return false;
     }
     if (selectedAddresses.get_Count() == 0)
     {
         this.area = Area.Null;
         if (Messages.QuestionYesNo(this, "Вы не выбрали адреса!\nОперация будет произведена для всего адресного плана.\nВы уверены, что хотите продолжить?") != System.Windows.Forms.DialogResult.Yes)
         {
             return false;
         }
     }
     else
     {
         this.area = new Area();
         this.area.SaveChanges();
         this.area.SaveAddresses(selectedAddresses);
     }
     return true;
 }
Esempio n. 13
0
 protected override void Fill(ObjectWithId obj)
 {
     ServiceNorm norm = (ServiceNorm) obj;
     this.ServiceOld = norm.ServiceOld;
     this.numNorm.set_Value(norm.Rate);
     this.selectUnit.SelectedFasetItem = norm.Unit;
     this.selectByUnit.SelectedFasetItem = norm.ByUnit;
     this.datePeriod.Fill(norm.Dateb, norm.Datee);
     this.selectOrgDocument.SelectedOrgDocument = norm.OrgDocument;
     this.bsServiceNormTypesByPropertiesView.set_DataSource(norm.GetFullServiceNormTypes(FasetsEnum.ApartmentProperties));
     this.bsServiceNormTypes.set_DataSource(norm.GetFullServiceNormTypes(FasetsEnum.ServiceNormType));
     this.tbxFromValue.set_Text(System.Convert.ToString(norm.FromValue));
     this.tbxToValue.set_Text(System.Convert.ToString(norm.ToValue));
     this.dgvServiceNormTypesByProperties.set_Enabled(true);
     this.dgvServiceNormTypes.set_Enabled(true);
 }
Esempio n. 14
0
 private ServiceOld GetServiceParametrs()
 {
     int num = 0;
     if (this.tbxCode.get_Text().Trim() != string.Empty)
     {
         try
         {
             num = int.Parse(this.tbxCode.get_Text().Trim());
         }
         catch (System.Exception exception)
         {
             Messages.ShowException(this, exception);
             return ServiceOld.Null;
         }
     }
     ServiceOld @null = new ServiceOld {
         ShortName = this.tbShortName.get_Text().Trim(),
         Code = num,
         ServiceTypeId = (this.bsServiceTypes.get_Current() ?? ServiceType.Null).Id,
         ServiceProviderId = (this.selectProviders.SelectedOrganizationOld ?? Organization.Null).Id,
         HouseHolderId = (this.selectHolders.SelectedOrganizationOld ?? Organization.Null).Id,
         ResourceProviderId = (this.selectResourceProvider.SelectedOrganizationOld ?? Organization.Null).Id,
         AdrId = (this.selectAddress.SelectedLocalAddress ?? LocalAddress.Null).Id,
         CanonicalServiceId = (((CanonicalService) this.bsCanonicalServices.get_Current()) ?? CanonicalService.Null).Id,
         IsSeasonal = this.cbIsSeasonal.get_Checked(),
         IsFixedPayment = this.cbIsFixedPayment.get_Checked(),
         LastRate = this.numLastRate.Value,
         LastRateFromDate = this.dbxLastDateRate.IsNull ? Constants.NullDate : this.dbxLastDateRate.Value,
         ServiceNormRate = this.numLastNorm.Value,
         ServiceNormFromDate = this.dbxLastDateNorm.IsNull ? Constants.NullDate : this.dbxLastDateNorm.Value
     };
     if ((((((@null.ShortName == "") && (@null.LongName == "")) && ((@null.Code == 0L) && (@null.ServiceTypeId == 0L))) && (((@null.ServiceProviderId == 0L) && (@null.HouseHolderId == 0L)) && ((@null.ResourceProviderId == 0L) && (@null.CalcAlgId == 0L)))) && ((((@null.AdrId == 0L) && (@null.CanonicalServiceId == 0L)) && ([email protected] && [email protected])) && (((@null.FromDate == Constants.NullDate) && (@null.ToDate == Constants.NullDate)) && ((@null.LastRate == 0M) && (@null.LastRateFromDate == Constants.NullDate))))) && (((@null.ServiceNormRate == 0M) && (@null.LastRateFromDate == Constants.NullDate)) && (this.m_Area == Area.Null)))
     {
         @null = ServiceOld.Null;
     }
     return @null;
 }
            public ServiceNode(ServiceOld s)
            {
                switch (Manager.SortOrder)
                {
                    case ChiefSortOrders.ByName:
                        base.set_Text(s.ToString());
                        break;

                    case ChiefSortOrders.ByCode:
                        base.set_Text(s.CodeName);
                        break;
                }
                base.set_Tag(s);
                base.Nodes.Add("");
            }
Esempio n. 16
0
 public static ObjectList<ServiceCalcAlg> FindByServiceId(ServiceOld service)
 {
     return Mappers.ServiceCalcAlgMapper.FindByServiceId(service.Id);
 }
Esempio n. 17
0
 private void btnChangeService_Click(object sender, System.EventArgs e)
 {
     string text = string.Empty;
     ObjectList<ServiceOld> selectedServices = this.vwServiceSearch.SelectedServices;
     if (selectedServices.get_Count() == 0)
     {
         text = text + "Выберите услуги" + System.Environment.get_NewLine();
     }
     if (this.selectServices.SelectedServices.get_Count() == 0)
     {
         text = text + "Выберите услугу открытия" + System.Environment.get_NewLine();
     }
     ServiceOld old = new ServiceOld();
     if (this.selectServices.SelectedServices.get_Count() != 0)
     {
         old = this.selectServices.SelectedServices.get_Item(0);
     }
     ObjectList<LocalAddress> selectedAddresses = ((OperationGroupForm) base.Parent.Parent.Parent.Parent.Parent).GetSelectedAddresses();
     OrgDocument selectedOrgDocument = this.selectOrgDocument.SelectedOrgDocument;
     if (this.dbxOpenDate.IsNull)
     {
         text = text + "Введите дату открытия" + System.Environment.get_NewLine();
     }
     if (this.dbxCloseDate.IsNull)
     {
         text = text + "Введите дату закрытия" + System.Environment.get_NewLine();
     }
     if ((!this.dbxOpenDate.IsNull && !this.dbxCloseDate.IsNull) && (this.dbxOpenDate.Value < this.dbxCloseDate.Value.AddDays((double) 1.0)))
     {
         text = text + "Дата открытия должна быть не раньше чем следующий день после даты закрытия" + System.Environment.get_NewLine();
     }
     if (text != string.Empty)
     {
         BalloonWindow.Show(this.btnChangeService, text);
     }
     else
     {
         string str2 = string.Empty;
         if (selectedAddresses.get_Count() == 0)
         {
             str2 = str2 + "Вы не выбрали адреса!\nОперация будет произведена для всего адресного плана.\n";
         }
         if (this.dbxOpenDate.Value != this.dbxCloseDate.Value.AddDays((double) 1.0))
         {
             str2 = str2 + "Указанная дата открытия более чем на один день позже, чем дата закрытия.\n";
         }
         if ((str2 == string.Empty) || (Messages.QuestionYesNo(this, str2 + "Вы уверены, что хотите продолжить?") == System.Windows.Forms.DialogResult.Yes))
         {
             Area area = new Area();
             area.SaveChanges();
             area.SaveAddresses(selectedAddresses);
             string str3 = GroupOperation.CheckAccountJointServices(area.Id, selectedServices);
             if (str3 != string.Empty)
             {
                 Messages.ShowMessage("Операция не может быть проведена,т.к. на перечисленных ниже адресах открыто более одной из выбранных услуг: " + str3);
                 area.DeleteWithRelations();
             }
             else if (Messages.QuestionYesNo(this, "Все выбранные услуги будут сменены на выбранную,операция необратима,продолжить?") == System.Windows.Forms.DialogResult.Yes)
             {
                 bool avanceTransfer = this.cbAdvancesMove.get_Checked() ? ((bool) true) : ((bool) false);
                 bool debtTransfer = this.chDebtTransfer.get_Checked() ? ((bool) true) : ((bool) false);
                 bool opServicesTransfer = this.chOpServicesTransfer.get_Checked() ? ((bool) true) : ((bool) false);
                 bool connectionCounter = this.chConnectionCounter.get_Checked() ? ((bool) true) : ((bool) false);
                 bool connectionEquipment = this.chConnectionEquipment.get_Checked() ? ((bool) true) : ((bool) false);
                 Organization organization = this.selectHouseHolder.SelectedOrganizationOld ?? Organization.Null;
                 Organization organization2 = this.selectAccountHouseHolder.SelectedOrganizationOld ?? Organization.Null;
                 foreach (ServiceOld old2 in selectedServices)
                 {
                     int? selectedEnumValue = this.enumDebt.SelectedEnumValue;
                     int? nullable2 = this.enumAvance.SelectedEnumValue;
                     GroupOperation.CloseOpenAccountService(old2.Id, old.Id, this.dbxCloseDate.Value, this.dbxOpenDate.Value, avanceTransfer, debtTransfer, selectedOrgDocument, selectedAddresses, organization.Id, organization2.Id, !this.cbxIsCharge.get_Checked(), opServicesTransfer, connectionCounter, connectionEquipment, true, true, selectedEnumValue.get_HasValue() ? selectedEnumValue.GetValueOrDefault() : ((int) 0), nullable2.get_HasValue() ? nullable2.GetValueOrDefault() : ((int) 0));
                 }
                 Messages.ShowMessage("Групповая операция по смене услуги выполнена");
             }
         }
     }
 }
 private void UpdateServiceFields(ServiceOld serviceOld)
 {
     this.lbServiceType.set_Text(serviceOld.ServiceType.ShortName);
     this.lbHouseHolder.set_Text(serviceOld.HouseHolder.ShortName);
     this.lbResource.set_Text(serviceOld.ResourceProvider.ShortName);
     this.lbAddress.set_Text(serviceOld.Adr.AddrName);
     this.lbTarif.set_Text((serviceOld == ServiceOld.Null) ? ((string) "") : (serviceOld.LastRate + " от " + serviceOld.LastRateFromDate.ToShortDateString()));
     this.lbIsSeasonal.set_Text(serviceOld.IsSeasonal ? ((string) "да") : ((string) "нет"));
     this.lblCanonicalName.set_Text(serviceOld.CanonicalService.ShortName);
 }
 private void bFind_Click(object sender, System.EventArgs e)
 {
     ServiceType serviceType = this.bsServiceTypes.get_Current() as ServiceType;
     if (serviceType != null)
     {
         ServiceOld service = new ServiceOld();
         if (this.selectServices1.SelectedServices.get_Count() != 0)
         {
             service = this.selectServices1.SelectedServices.get_Item(0);
         }
         ObjectList<LocalAddress> localAddresses = this.selectAddresses.GetLocalAddresses();
         ObjectList<LocalAddress> addresses = null;
         int? lowestFloor = null;
         int? highestFloor = null;
         int? startYear = null;
         int? endYear = null;
         long? canonicalTypeId = null;
         if (this.selectCanonicalType.SelectedFasetItem != FasetItem.Null)
         {
             canonicalTypeId = new long?((long) this.selectCanonicalType.SelectedFasetItem.Id);
         }
         if (this.cbxFloor.get_Checked())
         {
             lowestFloor = new int?(System.Convert.ToInt32(this.nudFloorBegin.Value));
             highestFloor = new int?(System.Convert.ToInt32(this.nudFloorEnd.Value));
         }
         if (this.cbxYear.get_Checked())
         {
             startYear = new int?(System.Convert.ToInt32(this.nudYearBegin.Value));
             endYear = new int?(System.Convert.ToInt32(this.nudYearEnd.Value));
         }
         if (localAddresses.get_Count() > 0)
         {
             addresses = LocalAddress.GetRelationsByLevel(localAddresses, AddressLevel.Дом);
         }
         ObjectList<HouseWithServiceTariff> houses = HouseWithServiceTariff.FindBy(null, serviceType.Id, canonicalTypeId, addresses, lowestFloor, highestFloor, startYear, endYear, this.cbxHousesWithoutTariffs.get_Checked(), this.cbxHousesWithoutNorms.get_Checked(), service.Id);
         this.houseServiceTariffAddView.Fill(houses, serviceType, service);
         this.selectAddresses.SelectedArea.DeleteWithRelations();
         this.statsLabel.set_Text((houses.get_Count() == 0) ? string.Empty : string.Format("Количество домов: {0}", (int) houses.get_Count()));
     }
 }
Esempio n. 20
0
 public static ObjectList<RemitteeService> FindByServiceId(ServiceOld serviceOld)
 {
     return Mappers.RemitteeServiceMapper.FindByServiceId(serviceOld.Id);
 }
Esempio n. 21
0
 public static ObjectList<ServiceSeasonal> FindByService(ServiceOld serviceOld)
 {
     return Mappers.ServiceSeasonalMapper.FindByServiceId(serviceOld.Id);
 }
Esempio n. 22
0
 protected override void Clear()
 {
     this._mServiceOld = ServiceOld.Null;
     this.bsServicePenalties.Clear();
 }
Esempio n. 23
0
 protected override void Fill(ObjectWithId obj)
 {
     this.m_service = (ServiceOld) obj;
     this.bsServiceCalcAlg.set_DataSource(Mappers.ServiceCalcAlgMapper.FindByServiceId(this.m_service.Id));
 }
Esempio n. 24
0
 public static ServiceOld AddService(ServiceOld s)
 {
     if (Services.FindById(s.Id) == null)
     {
         Services.Add(s);
     }
     return s;
 }
Esempio n. 25
0
 protected override void Fill(ObjectWithId obj)
 {
     this.m_service = (ServiceOld) obj;
     this.bsRemitteeService.set_DataSource(Mappers.RemitteeServiceMapper.FindByServiceId(this.m_service.Id));
 }
Esempio n. 26
0
 public static BindingListView<FixedSummServiceView> Find(ServiceOld serviceOld, LocalAddress address)
 {
     return Mappers.FixedSummServiceViewMapper.Find(serviceOld, address);
 }
Esempio n. 27
0
 public RemitteeServiceView(ServiceOld service)
     : this()
 {
     this.m_service = service;
 }
Esempio n. 28
0
 public void Execute(ServiceOld serviceOld)
 {
     Mappers.FixedSummServiceViewMapper.Execute(serviceOld, this);
 }
Esempio n. 29
0
 public static ObjectList<HouseServiceSeason> FindByServiceAndHouse(ServiceOld serviceOld, House house)
 {
     return Mappers.HouseServiceSeasonMapper.FindByServiceIdAndHouseId(serviceOld.Id, house.Id);
 }
Esempio n. 30
0
 protected override void Fill(ObjectWithId obj)
 {
     this._mServiceOld = (ServiceOld) obj;
     this.bsServicePenalties.set_DataSource(this._mServiceOld.GetServicePenalties());
     this.bsServicePenalties.set_Sort(this.bsServicePenalties.get_Sort());
 }