本文整理汇总了C#中XPCollection.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# XPCollection.Remove方法的具体用法?C# XPCollection.Remove怎么用?C# XPCollection.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XPCollection
的用法示例。
在下文中一共展示了XPCollection.Remove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAll
public XPCollection<Job> GetAll(Int64 planningId, DateTime date)
{
try
{
//List<Job> jobs = new XPCollection<Job>(Session).OrderBy(bc => bc.Id).ToList();
//TODO: Find better fix
var jobs = new XPCollection<Job>(this.Session);
var jobsTwo = new XPCollection<Job>(this.Session);
SortingCollection sc = new SortingCollection();
sc.Add(new SortProperty("Id", SortingDirection.Ascending));
jobs.Sorting = sc;
foreach (Job job in jobs)
{
if (job.Planning != planningId || job.JobDate.Date != date.Date)
jobsTwo.Remove(job);
}
return jobsTwo;
}
catch (Exception exception1)
{
Exception innerException = exception1;
throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
}
}
示例2: GetAll
public XPCollection<PlanningMemo> GetAll(Int64 planningId, DateTime date)
{
try
{
XPCollection<PlanningMemo> planningMemos = new XPCollection<PlanningMemo>(Session);
XPCollection<PlanningMemo> planningMemosTwo = new XPCollection<PlanningMemo>(Session);
SortingCollection sc = new SortingCollection();
sc.Add(new SortProperty("Id", DevExpress.Xpo.DB.SortingDirection.Ascending));
planningMemos.Sorting = sc;
foreach (PlanningMemo memo in planningMemos)
{
if (memo.Planning != planningId || memo.PlanningMemoDate.Date != date.Date)
planningMemosTwo.Remove(memo);
}
return planningMemosTwo;
}
catch (Exception exception1)
{
Exception innerException = exception1;
throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
}
}