当前位置: 首页>>代码示例>>C#>>正文


C# ObjectList.FindById方法代码示例

本文整理汇总了C#中ObjectList.FindById方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectList.FindById方法的具体用法?C# ObjectList.FindById怎么用?C# ObjectList.FindById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ObjectList的用法示例。


在下文中一共展示了ObjectList.FindById方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: isUpdateBindingReports

 private bool isUpdateBindingReports()
 {
     ObjectList<RepReport> list = new ObjectList<RepReport>();
     list = this.tsbRepresentMyReport.get_Checked() ? RepReport.FindByPeriodUser(this.dbRepresentPeriodDate.DateBegin, this.dbRepresentPeriodDate.DateEnd) : RepReport.FindByPeriod(this.dbRepresentPeriodDate.DateBegin, this.dbRepresentPeriodDate.DateEnd);
     foreach (RepReport report in (ObjectList<RepReport>) this.bsReports.get_DataSource())
     {
         RepReport report2 = list.FindById(report.Id);
         if ((report2 == null) || (report2.Status != report.Status))
         {
             return true;
         }
     }
     return false;
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:14,代码来源:ReportsMainForm.cs

示例2: btnResidentsDelete_Click

 private void btnResidentsDelete_Click(object sender, System.EventArgs e)
 {
     ApartmentResident currentApartmentResident = this.GetCurrentApartmentResident();
     if (currentApartmentResident == ApartmentResident.Null)
     {
         Messages.ShowMessage("Выберите проживающего для удаления");
     }
     else
     {
         ObjectList<ApartmentResidentBenefit> apartmentResidentBenefitsByResident = currentApartmentResident.GetApartmentResidentBenefitsByResident();
         if (apartmentResidentBenefitsByResident.get_Count() > 0)
         {
             string str = string.Empty;
             ObjectList<AIS.SN.Model.DomainObjects.Person> list2 = new ObjectList<AIS.SN.Model.DomainObjects.Person>();
             foreach (ApartmentResidentBenefit benefit in apartmentResidentBenefitsByResident)
             {
                 if (list2.FindById(benefit.PersonId) == null)
                 {
                     list2.Add(benefit.GetPerson());
                     string str2 = (benefit.ToDate == Constants.NullDate) ? ((string) " ,...)") : ("," + benefit.ToDate.ToShortDateString() + ")");
                     string str3 = str;
                     str = string.Concat((string[]) new string[] { str3, benefit.PersonName, " (", benefit.FromDate.ToShortDateString(), str2, System.Environment.get_NewLine() });
                 }
             }
             Messages.ShowMessage("Удаление проживающего невозможно, пока не будут удалены связи со льготами: " + System.Environment.get_NewLine() + str);
         }
         else if (Messages.QuestionYesNo(base.FindForm(), "Вы уверены, что хотите удалить?") != System.Windows.Forms.DialogResult.No)
         {
             currentApartmentResident.Delete();
             this.UpdateBindingSourceApartmentResidents();
         }
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:33,代码来源:ApartmentResidentsView.cs

示例3: btnSave_Click

 private void btnSave_Click(object sender, System.EventArgs e)
 {
     if ((this.selectTypeResident.SelectedFasetItem == FasetItem.Null) || this.dbxBegin.IsNull)
     {
         new BalloonWindow("Не все поля заполнены").Show(this.btnSave);
     }
     else
     {
         ApartmentResident resident = ApartmentResident.FindById(this.apr.Id);
         resident.FromDate = this.dbxBegin.Value;
         resident.ToDate = this.dbxEnd.IsNull ? System.DateTime.MinValue : this.dbxEnd.Value;
         ObjectList<ApartmentResidentBenefit> apartmentResidentBenefitsByResidentToDate = resident.GetApartmentResidentBenefitsByResidentToDate();
         if (apartmentResidentBenefitsByResidentToDate.get_Count() > 0)
         {
             string str = string.Empty;
             ObjectList<Person> list2 = new ObjectList<Person>();
             foreach (ApartmentResidentBenefit benefit in apartmentResidentBenefitsByResidentToDate)
             {
                 if (list2.FindById(benefit.PersonId) == null)
                 {
                     list2.Add(benefit.GetPerson());
                     string str2 = (benefit.ToDate == Constants.NullDate) ? ((string) " ,...)") : ("," + benefit.ToDate.ToShortDateString() + ")");
                     string str3 = str;
                     str = string.Concat((string[]) new string[] { str3, benefit.PersonName, " (", benefit.FromDate.ToShortDateString(), str2, System.Environment.get_NewLine() });
                 }
             }
             Messages.ShowMessage("Изменение даты выписки невозможно, пока не будут удалены связи со льготами: " + System.Environment.get_NewLine() + str);
         }
         else if (resident.GetCountVacationsByToDate() > 0)
         {
             Messages.ShowMessage("Изменение даты выписки невозможно, т.к. существует временное отсутствие за периодом прописки.");
         }
         else
         {
             this.apr.TypeResidents = this.selectTypeResident.SelectedFasetItem.Id;
             this.apr.Relative = this.seletcRelative.SelectedFasetItem.Id;
             this.apr.FromDate = this.dbxBegin.Value;
             this.apr.ToDate = this.dbxEnd.IsNull ? System.DateTime.MinValue : this.dbxEnd.Value;
             this.apr.Comment = this.tbComment.get_Text();
             this.apr.SaveChanges();
             base.Close();
         }
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:44,代码来源:ApartmentResidentChangeForm.cs

示例4: GetLeavesByRoot

 public void GetLeavesByRoot(ObjectList<LocalAddress> addresses, AddressesNode node)
 {
     node.NullDelete();
     if ((node.Nodes.get_Count() == 0) || (node.ForeColor == Color))
     {
         if (addresses.FindById(((LocalAddress) node.get_Tag()).Id) == null)
         {
             addresses.Add((LocalAddress) node.get_Tag());
         }
         node.NullAdd();
     }
     else
     {
         foreach (AddressesNode node2 in node.Nodes)
         {
             this.GetLeavesByRoot(addresses, node2);
         }
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:19,代码来源:AreaAddressesTree.cs


注:本文中的ObjectList.FindById方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。