protected override void Fill(ObjectWithId obj)
 {
     CalcOperationGroup group = (CalcOperationGroup) obj;
     this.m_NameBox.set_Text(group.Name);
     this.m_InvertCheck.set_Checked(group.IsInverted);
     this.m_ContentsButton.set_Enabled(true);
 }
 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);
 }
Beispiel #3
0
        protected override void Fill(ObjectWithId obj)
        {
            CalcOperation operation = (CalcOperation) obj;
            this.m_NameText.set_Text(operation.Name);
            switch (operation.Sign)
            {
                case CalcOperationSign.Negative:
                    this.m_NegativeRadio.set_Checked(true);
                    break;

                case CalcOperationSign.Saldo:
                    this.m_SaldoRadio.set_Checked(true);
                    break;

                case CalcOperationSign.Positive:
                    this.m_PositiveRadio.set_Checked(true);
                    break;

                default:
                    throw new System.ArgumentOutOfRangeException();
            }
            this.cbAllowManuallyAdding.set_Checked(operation.AllowManuallyAdding);
            this.cbAllowEditingInCurrentPeriod.set_Checked(operation.AllowEditingInCurrentPeriod);
            this.cbAllowEditingInAnyPeriod.set_Checked(operation.AllowEditingInAnyPeriod);
            this.cbOffBalance.set_Checked(System.Convert.ToBoolean(operation.OffBalance));
        }
 public void RefreshSelectedNode(ObjectWithId owid)
 {
     if (base.SelectedNode != null)
     {
         if ((base.SelectedNode.GetType() == typeof(OrganizationNode)) && (owid.GetType() == typeof(Organization)))
         {
             base.Nodes.Add(new OrganizationNode((Organization) owid));
         }
         else
         {
             System.Windows.Forms.TreeNode selectedNode = base.SelectedNode;
             selectedNode.Nodes.Clear();
             selectedNode.Nodes.Add("");
             (selectedNode as IExpandableNode).OnBeforeExpand();
             selectedNode.Expand();
             if (owid != null)
             {
                 foreach (System.Windows.Forms.TreeNode node2 in selectedNode.Nodes)
                 {
                     if ((node2.get_Tag() != null) && owid.Equals(node2.get_Tag()))
                     {
                         base.SelectedNode.EnsureVisible();
                         base.set_SelectedNode(node2);
                         break;
                     }
                 }
             }
         }
     }
 }
Beispiel #5
0
 protected override void Fill(ObjectWithId obj)
 {
     this.m_Area = (Area) obj;
     this.tbName.set_Text(this.m_Area.Name);
     this.btnAddresses.set_Enabled(true);
     this.addressesDest = this.m_Area.GetLocalAddresses();
 }
 protected override void Fill(ObjectWithId obj)
 {
     CanonicalService service = (CanonicalService) obj;
     this.numCode.set_Value((decimal) service.Code);
     this.tbShortName.set_Text(service.ShortName);
     this.tbLongName.set_Text(service.LongName);
     this.cbServiceType.set_SelectedItem(service.GetSrvType());
 }
Beispiel #7
0
        public void ItShouldntCreateNewRegistryWhenSavingObjectsWithSameIdProperty()
        {
            var littledb = new LittleDB("myDatabase");
            var objectWithId = new ObjectWithId(23, "myObject");
            littledb.Save(objectWithId);
            littledb.Save(objectWithId);

            littledb.GetAll<ObjectWithId>().Count.ShouldBeEquivalentTo(1);
        }
Beispiel #8
0
 protected override void Fill(ObjectWithId obj)
 {
     Server server = (Server) obj;
     this.tbServerName.set_Text(server.Name);
     this.tbIpAddress.set_Text(server.IpAddress);
     this.tbDbName.set_Text(server.DbName);
     this.tbUserName.set_Text(server.UserName);
     this.tbUserPwd.set_Text(server.UserPwd);
 }
 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);
     }
 }
Beispiel #10
0
 protected override void Fill(ObjectWithId obj)
 {
     OrgDocument document = (OrgDocument) obj;
     this.selectDocType.SelectedFasetItem = document.Type;
     this.tbNumber.set_Text(document.Number);
     this.dateWhen.Value = document.WhenGet;
     this.selectOrganization.SelectedOrganizationOld = document.Organization;
     this.tbComment.set_Text(document.Comment);
     this.dbFromDate.Value = document.FromDate;
     this.dbToDate.Value = document.ToDate;
 }
Beispiel #11
0
        public void ItShouldGiveIdToObjectsWithThePropertyAndIdIsZero()
        {
            var littledb = new LittleDB("myDatabase");
            var objectWithId = new ObjectWithId(0, "myObject");
            littledb.Save(objectWithId);
            littledb.GetAll<ObjectWithId>().Last().Id.ShouldBeEquivalentTo(1);

            var anotherObjectWithId = new ObjectWithId(0, "myObject");
            littledb.Save(anotherObjectWithId);
            littledb.GetAll<ObjectWithId>().Last().Id.ShouldBeEquivalentTo(2);
        }
 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);
     }
 }
 protected override void PopulateData()
 {
     using (var session = Domain.OpenSession())
         using (var tx = session.OpenTransaction()) {
             var o1 = new ObjectWithId();
             var o2 = new ObjectWithId();
             var o3 = new ObjectWithId();
             keys.Add(o1.Id);
             keys.Add(o3.Id);
             tx.Complete();
         }
 }
 protected override void Fill(ObjectWithId obj)
 {
     CalcOperationGroup group = (CalcOperationGroup) obj;
     base.ObjectWithId = group;
     this.m_InGroupOperationsBindingSource.set_DataSource(group.Operations);
     ObjectList<CalcOperation> list = Mappers.GetMap<CalcOperation>().FindAll();
     foreach (CalcOperation operation in group.Operations)
     {
         list.Remove(operation);
     }
     list.ApplySort("Name");
     this.m_AvailableOperationsBindingSource.set_DataSource(list);
 }
Beispiel #15
0
 public CollectionForm(ObjectWithId owid, string title, BaseView view)
     : this()
 {
     this.SelectedObject = owid;
     this.set_Text(title);
     this.view = view;
     this.view.ClearView();
     this.view.ObjectWithId = owid;
     this.view.set_Location(new System.Drawing.Point(8, 8));
     base.Controls.Add(this.view);
     base.set_Size(new System.Drawing.Size((int) (this.view.get_Width() + 0x10), (int) (this.view.get_Height() + 90)));
     this.btnOk.set_Location(new System.Drawing.Point((int) (base.get_Width() - 200), (int) (this.view.get_Height() + 0x18)));
     this.btnCancel.set_Location(new System.Drawing.Point((int) (this.btnOk.get_Right() + 8), this.btnOk.get_Top()));
 }
Beispiel #16
0
 protected void btnOk_Click(object sender, System.EventArgs e)
 {
     try
     {
         this.SelectedObject = this.view.SaveChanges(false);
         base.set_DialogResult(System.Windows.Forms.DialogResult.OK);
         base.Close();
     }
     catch (System.Exception exception)
     {
         Messages.ShowException(this, exception);
         this.SelectedObject = null;
     }
 }
Beispiel #17
0
 protected override void Fill(ObjectWithId obj)
 {
     ServiceTypeOld old = (ServiceTypeOld) obj;
     this.numCode.set_Value((decimal) old.Code);
     this.tbShortName.set_Text(old.ShortName);
     this.tbLongName.set_Text(old.LongName);
     this.tbUnloadDbfName.set_Text(old.UnloadDbfName);
     this.cbIsGroup.set_Checked((old.IsGroup == 0) ? ((bool) false) : ((bool) true));
     this.selectUnit.SelectedFasetItem = old.Unit;
     this.selectServiceTypes.set_SelectedIndex(this.selectServiceTypes.Items.IndexOf((old.TypeId == 0) ? FasetItem.Null : Register.GetFasetItem(FasetsEnum.ServiceTypes, old.TypeId)));
     this.bsParentServiceTypes.set_DataSource(ServiceTypeOld.FindParentServiceTypesSortedByCode());
     this.bsParentServiceTypes.Add(ServiceTypeOld.Null);
     if ((old.Parent != ServiceTypeOld.Null) && (old.Parent != null))
     {
         this.bsParentServiceTypes.set_Position(this.bsParentServiceTypes.IndexOf((this.bsParentServiceTypes.get_DataSource() as ObjectList<ServiceTypeOld>).FindById(old.Parent.Id)));
     }
     else
     {
         this.bsParentServiceTypes.set_Position(this.bsParentServiceTypes.IndexOf(ServiceTypeOld.Null));
     }
 }
Beispiel #18
0
 private void ShowView(ObjectWithId owid)
 {
     if ((owid == null) || !this.views.ContainsKey(owid.GetType()))
     {
         this.UnvisibleShowView();
     }
     else
     {
         BaseView view = (BaseView) this.views[owid.GetType()];
         view.ClearView();
         this.ShowView(view);
         view.FillView(owid);
         view.ObjectWithId = owid;
     }
 }
Beispiel #19
0
 public void ChangeItem(ObjectWithId owid)
 {
     this.dirListBox.Items.Remove(owid);
     this.dirListBox.Items.Add(owid);
     this.dirListBox.set_SelectedItem(owid);
 }
Beispiel #20
0
 public void AddNewItem(ObjectWithId owid)
 {
     this.dirListBox.Items.Add(owid);
     this.dirListBox.set_SelectedItem(owid);
 }
Beispiel #21
0
 protected override void Fill(ObjectWithId obj)
 {
     this.m_service = (ServiceOld) obj;
     this.bsRemitteeService.set_DataSource(Mappers.RemitteeServiceMapper.FindByServiceId(this.m_service.Id));
 }
Beispiel #22
0
 protected override void Fill(ObjectWithId obj)
 {
     this.m_service = (ServiceOld) obj;
     this.bsServiceCalcAlg.set_DataSource(Mappers.ServiceCalcAlgMapper.FindByServiceId(this.m_service.Id));
 }
 protected override void Fill(ObjectWithId obj)
 {
     this.status = (DebtActionStatus) obj;
     this.fillStatusContent();
     this.bsAllActionStatusContents.set_DataSource(this.availableStatusContent);
     this.bsAvailableActionStatusContents.set_DataSource(this.allStatusContent);
 }
Beispiel #24
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);
 }
Beispiel #25
0
 protected override void Fill(ObjectWithId obj)
 {
     ExchangeRequest request = (ExchangeRequest) obj;
     REQ534 req = Serializer.FromXml<REQ534>(request.XmlIn);
     this.labelType.set_Text((string) new string[] { "Новый счетчик", "Счетчик опломбирован", "Счетчик снят", "Контрольные показания" }[req.TYPE_REQ.TYPE - 0x216]);
     this.tbFrom.set_Text(req.ORG.NAMEORG + "," + req.ORG.FIO);
     string str = string.Empty;
     if (!string.IsNullOrEmpty(req.BODY_REQ.PERSON.LAST_NAME))
     {
         str = str + req.BODY_REQ.PERSON.LAST_NAME + ' ';
     }
     if (!string.IsNullOrEmpty(req.BODY_REQ.PERSON.FIRST_NAME))
     {
         str = str + req.BODY_REQ.PERSON.FIRST_NAME + ' ';
     }
     if (!string.IsNullOrEmpty(req.BODY_REQ.PERSON.MIDDLE_NAME))
     {
         str = str + req.BODY_REQ.PERSON.MIDDLE_NAME + ' ';
     }
     if (!string.IsNullOrEmpty(req.BODY_REQ.PERSON.BIRTH_DATE))
     {
         str = str + req.BODY_REQ.PERSON.BIRTH_DATE + "г.р. ";
     }
     str = str + req.BODY_REQ.PERSON.CONTACT_DATA;
     this.fIO.set_Text(str);
     str = string.Empty;
     if (!string.IsNullOrEmpty(req.BODY_REQ.ADDRESS.CITY))
     {
         str = str + req.BODY_REQ.ADDRESS.CITY + ", ";
     }
     if (!string.IsNullOrEmpty(req.BODY_REQ.ADDRESS.STREET_NAME))
     {
         str = str + req.BODY_REQ.ADDRESS.STREET_TYPE + req.BODY_REQ.ADDRESS.STREET_NAME + ", ";
     }
     if (!string.IsNullOrEmpty(req.BODY_REQ.ADDRESS.HOUSE))
     {
         str = str + req.BODY_REQ.ADDRESS.HOUSE + '-';
     }
     if (!string.IsNullOrEmpty(req.BODY_REQ.ADDRESS.FLAT))
     {
         str = str + req.BODY_REQ.ADDRESS.FLAT;
     }
     this.apartmentAddress.set_Text(str);
     this.tbxPurpose.set_Text(req.BODY_REQ.COUNTER.PURPOSE);
     this.tbxPointAccount.set_Text(req.BODY_REQ.COUNTER.POINT_ACCOUNTING);
     this.tbPlomb.set_Text(req.BODY_REQ.COUNTER.STAMP);
     this.tbNumber.set_Text(req.BODY_REQ.COUNTER.NUMBER);
     this.tbName.set_Text(req.BODY_REQ.COUNTER.NAME);
     this.nudCounterSize.set_Text(req.BODY_REQ.COUNTER.SIZE);
     this.nudFactor.set_Text(req.BODY_REQ.COUNTER.FACTOR);
     this.cbMaddle.set_Text(req.BODY_REQ.COUNTER.MADDLE_TYPE);
     this.cbMark.set_Text(req.BODY_REQ.COUNTER.MARK);
     this.cbPlace.set_Text(req.BODY_REQ.COUNTER.PLACE);
     this.cbType.set_Text(req.BODY_REQ.COUNTER.TYPE);
     this.cbTypeScaleCounter.set_Text(req.BODY_REQ.COUNTER.TYPE_SCALE_COUNTER);
     this.dbBegin.set_Text(req.BODY_REQ.COUNTER.DATEB);
     this.dbEnd.set_Text(req.BODY_REQ.COUNTER.DATEE);
     this.dbStamp.set_Text(req.BODY_REQ.COUNTER.STAMP_DATE);
     this.controlDate.set_Text(req.BODY_REQ.COUNTER.CONTROL_DATE);
     this.controlIndication.set_Text(req.BODY_REQ.COUNTER.CONTROL_INDICATION);
     if (request.Account == null)
     {
         foreach (Apartment apartment in Apartment.FindByAddress(request.Address))
         {
             this.listApartments.Items.Add(apartment);
         }
     }
     else
     {
         this.listApartments.Items.Add(request.Account.GetApartment());
     }
     if (this.listApartments.Items.get_Count() > 0)
     {
         this.listApartments.set_SelectedIndex(0);
     }
     if (!string.IsNullOrEmpty(req.ORG.SIGNATURE))
     {
         try
         {
             ForQuery query = new ForQuery();
             this.labelSign.set_Text("Цифровая подпись: " + query.Check(req.ORG.FIO, req.ORG.SIGNATURE));
             return;
         }
         catch (System.Runtime.InteropServices.COMException exception)
         {
             AIS.SN.UI.Messages.ShowException(base.FindForm(), new System.ApplicationException("Ошибка при проверке цифровой подписи.", exception));
             return;
         }
     }
     this.labelSign.set_Text("Цифровая подпись отсутсвует. Регистратор: " + req.ORG.FIO);
     this.labelSign.set_ForeColor(System.Drawing.Color.Red);
 }
 protected override void Fill(ObjectWithId obj)
 {
     this.m_ExchangeRequestAddress = (ExchangeRequestAddress) obj;
     this.tbxAddress.set_Text(string.Format("г. {0} ул. {1} д. {2} кв. {3}", new object[] { this.m_ExchangeRequestAddress.Region, this.m_ExchangeRequestAddress.Street, this.m_ExchangeRequestAddress.House, this.m_ExchangeRequestAddress.Flat }));
     this.tbxOwnerFio.set_Text(string.Format("{0} {1} {2}", this.m_ExchangeRequestAddress.OwnerLastName, this.m_ExchangeRequestAddress.OwnerFirstName, this.m_ExchangeRequestAddress.OwnerMiddleName));
     this.exchangeRequestResidentsView.Fill(this.m_ExchangeRequestAddress);
     try
     {
         System.Collections.Generic.List<ExchangeRequestAddress> restFlatCardsByFlatCardId = ExchangeRequestAddress.GetRestFlatCardsByFlatCardId(this.m_ExchangeRequestAddress.FlatCardId);
         this.m_initiated = false;
         this.cbxFlatCards.set_DataSource(restFlatCardsByFlatCardId);
         ExchangeRequestAddress address = null;
         foreach (ExchangeRequestAddress address2 in restFlatCardsByFlatCardId)
         {
             if (this.m_ExchangeRequestAddress.FlatCardId == address2.FlatCardId)
             {
                 address = address2;
                 break;
             }
         }
         if (address != null)
         {
             this.cbxFlatCards.set_SelectedItem(address);
             this.cbxFlatCards.set_Text(address.ToString());
         }
     }
     catch (System.Exception exception)
     {
         Messages.ShowMessage("Нет доступа к веб сервису, обратитесь к администратору системы" + System.Environment.get_NewLine() + exception);
     }
     this.m_initiated = true;
     if (this.m_ExchangeRequestAddress.LocalAddressId != LocalAddress.Null.Id)
     {
         this.localAddressSelector.SelectAddress(this.m_ExchangeRequestAddress.LocalAddressId);
         this.btnCompare.set_Enabled(false);
         this.btnUnCompare.set_Enabled(!this.btnCompare.get_Enabled());
         this.LoadApartmentsByAddress();
         this.SelectApartment();
     }
     else
     {
         LocalAddress localAddress = this.GetLocalAddress(this.m_ExchangeRequestAddress.Region, this.m_ExchangeRequestAddress.Street, this.m_ExchangeRequestAddress.House, this.m_ExchangeRequestAddress.Flat);
         if (localAddress == LocalAddress.Null)
         {
             this.localAddressSelector.Clear();
         }
         else
         {
             this.localAddressSelector.SelectAddress(localAddress.Id);
         }
         if (this.GetFlagComparison(localAddress, this.m_ExchangeRequestAddress))
         {
             this.btnCompare.PerformClick();
         }
         else
         {
             this.btnCompare.set_Enabled(true);
             this.btnUnCompare.set_Enabled(!this.btnCompare.get_Enabled());
             this.apartmentResidentsView.Clear();
         }
     }
 }
Beispiel #27
0
 protected override void Fill(ObjectWithId obj)
 {
     Budget budget = (Budget) obj;
     this.selectOrganization.SelectedOrganizationOld = budget.Org;
     this.selecеBudgetType.SelectedFasetItem = budget.BudgetFaset;
 }
Beispiel #28
0
 protected override void Fill(ObjectWithId obj)
 {
     ServiceTariff tariff = (ServiceTariff) obj;
     this._mService = tariff.GetService();
     this.numTariff.set_Value(tariff.Rate);
     this.selectOrgDocument.SelectedOrgDocument = tariff.OrgDocument;
     this.dbFromDate.Value = tariff.FromDate;
     this.bsServiceTariffTypes.set_DataSource(ServiceTariffType.FindByServiceTariffId(tariff.Id));
     this.panel1.set_Visible(true);
     if (!User.IsMemberOf(RightsEnum.ВводОтрицательногоТарифа))
     {
         this.epRights.SetError(this.numTariff, "У Вас нет прав на ввод отрицательного тарифа");
     }
 }
Beispiel #29
0
 private void directoryView_OnIExpandableNodeSelect(ObjectWithId owid)
 {
     this.ShowView(owid);
 }
Beispiel #30
0
 protected override void Fill(ObjectWithId obj)
 {
     bool flag;
     bool flag2;
     ServiceOld old = (ServiceOld) obj;
     this.m_Code.set_Text(((long) old.Code).ToString());
     this.serviceTypeBindingSource.set_Position(this.serviceTypeBindingSource.IndexOf(old.ServiceType));
     this.cbServiceType.set_Enabled(false);
     this.cbServiceType.set_Enabled(flag = User.IsMemberOf(RightsEnum.ИзменениеТипаУслуги));
     if (!flag)
     {
         this.epRights.SetError(this.cbCanonicalService, "У Вас нет прав на изменение Типа услуги");
     }
     this.orgsBindingSource.set_Position(this.orgsBindingSource.IndexOf(old.ServiceProvider));
     this.canonicalServiceBindingSource.set_Position(this.canonicalServiceBindingSource.IndexOf(old.CanonicalService));
     this.tbShortName.set_Text(old.ShortName);
     this.tbLongName.set_Text(old.LongName);
     this.algBindingSource.set_Position(this.algBindingSource.IndexOf(old.CalcAlg));
     this.selectOrganization.Selected((old.HouseHolderId == 0L) ? null : Organization.FindById(old.HouseHolderId));
     this.selectResourceProvider.Selected((old.ResourceProviderId == 0L) ? null : Organization.FindById(old.ResourceProviderId));
     this.selectAddress.Selected((old.AdrId == 0L) ? null : LocalAddress.FindById(old.AdrId));
     this.cbCanonicalService.set_Enabled(flag2 = User.IsMemberOf(RightsEnum.ИзменениеВидаБлагоустройстваНаУслуге));
     if (!flag2)
     {
         this.epRights.SetError(this.cbCanonicalService, "У Вас нет прав на изменение вида благоустройства");
     }
     this.cbIsSeasonal.set_Checked(old.IsSeasonal);
     this.cbIsFixedPayment.set_Checked(old.IsFixedPayment);
     this.datePeriod.DateBegin = old.FromDate;
     if (old.ToDate != Constants.NullDate)
     {
         this.datePeriod.DateEnd = old.ToDate;
     }
     this.nudMonthShift.set_Value((decimal) old.MonthShift);
     this.cbCanHaveNegativeCharge.set_Checked(old.CanHaveNegativeCharge);
     this.cbCanRecalcInCloceAccount.set_Checked(old.CanRecalcInCloseAccount);
     this.tbComment.set_Text(old.Comment);
     this.cbIsNotRecalculationOldPeriod.set_Checked(old.IsNotRecalculationOldPeriod);
     if (Setting.GetValueByName("Параметры расчетов", "Использовать периодику на алгоритмы в основной процедуре расчета") == "Да")
     {
         this.cbAlgorithm.set_Enabled(false);
         this.epRights.SetError(this.cbAlgorithm, "Алгоритмы задаются с периодикой на вкладке 'Алгоритмы");
     }
     else
     {
         bool flag3;
         this.epRights.SetError(this.cbAlgorithm, "");
         this.cbAlgorithm.set_Enabled(flag3 = User.IsMemberOf(RightsEnum.ИзменениеАлгоритмаНаУслуге));
         if (!flag3)
         {
             this.epRights.SetError(this.cbAlgorithm, "У Вас нет прав на изменение алгоритма");
         }
     }
 }
Beispiel #31
0
 protected override void Fill(ObjectWithId obj)
 {
     this.m_Organization = (Organization) obj;
     this.obj = this.m_Organization;
     this.orgListBindingSource.set_Position(this.orgListBindingSource.IndexOf(this.m_Organization.Parent));
     this.m_Code.set_Text(((long) this.m_Organization.Code).ToString());
     this.m_Code.set_Enabled(true);
     this.m_ShortName.set_Text(this.m_Organization.ShortName);
     this.m_LongName.set_Text(this.m_Organization.LongName);
     this.m_INN.set_Text((this.m_Organization.Inn == 0L) ? ((string) "") : ((long) this.m_Organization.Inn).ToString());
     this.m_KPP.set_Text((this.m_Organization.Kpp == 0L) ? ((string) "") : ((long) this.m_Organization.Kpp).ToString());
     this.m_OGRN.set_Text((this.m_Organization.Ogrn == 0L) ? ((string) "") : ((long) this.m_Organization.Ogrn).ToString());
     this.m_IsServiceProvider.set_Checked(this.m_Organization.IsServiceProvider);
     this.m_IsHouseHolder.set_Checked(this.m_Organization.IsHouseHolder);
     this.m_IsCashlessTransferrer.set_Checked(this.m_Organization.IsCashlessTransferrer);
     this.m_IsBenefitTransferrer.set_Checked(this.m_Organization.IsBenefitTransferrer);
     this.m_IsFlatOwner.set_Checked(this.m_Organization.IsFlatOwner);
     this.m_IsPaymentAgent.set_Checked(this.m_Organization.IsPaymentAgent);
     this.m_isResourceProvider.set_Checked(this.m_Organization.IsResourceProvider);
     this.m_IsContractEnded.set_Checked(this.m_Organization.IsContractEnded);
     this.m_DatePeriod.Fill(this.m_Organization.FromDate, this.m_Organization.ToDate);
     this.m_Info.set_Text(this.m_Organization.Info);
     this.m_AddrInfo.set_Text(this.m_Organization.AddrInfo);
     this.m_Address.set_Text(this.m_Organization.AddrName);
     this.m_ModeWk.set_Text(this.m_Organization.ModeWork);
     this.m_Phone.set_Text(this.m_Organization.Telephone);
     this.m_Fax.set_Text(this.m_Organization.Fax);
     this.m_Manager.set_Text(this.m_Organization.Manager);
     this.m_ManagerPosition.set_Text(this.m_Organization.ManagerPosition);
     this.m_ChiefAccountant.set_Text(this.m_Organization.ChiefAccountant);
     this.m_IsBankrupt.set_Checked(this.m_Organization.IsBankrupt);
     this.m_TelephoneEmergencyDispatchService.set_Text(this.m_Organization.TelephoneEmergencyDispatchService);
     if (this.m_Organization.DistributionPaymentType != FasetItem.Null.Id)
     {
         this.selectDistributePayment.SelectedFasetItem = FasetItem.FindById(this.m_Organization.DistributionPaymentType);
     }
     this.m_IsPaymentUseNotice.set_Checked(this.m_Organization.IsPaymentUseNotice);
     this.m_IsPaymentUseNegativeSumm.set_Checked(this.m_Organization.IsPaymentUseNegativeSumm);
     this.organizationMaterialsView1.SetOrganization(this.m_Organization.Id);
     this.organizationWagesView1.SetOrganization(this.m_Organization.Id);
     this.UpdateBindingSourceProperties();
 }