本文整理汇总了C#中CmsData.CMSDataContext.TotalPaid方法的典型用法代码示例。如果您正苦于以下问题:C# CMSDataContext.TotalPaid方法的具体用法?C# CMSDataContext.TotalPaid怎么用?C# CMSDataContext.TotalPaid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CmsData.CMSDataContext
的用法示例。
在下文中一共展示了CMSDataContext.TotalPaid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AmountDueTrans
public static decimal AmountDueTrans(CMSDataContext db, Transaction ti)
{
var org = db.LoadOrganizationById(ti.OrgId);
var tt = (from t in db.ViewTransactionSummaries
where t.RegId == ti.OriginalId
select t).FirstOrDefault();
if (tt == null)
return 0;
if (org.IsMissionTrip ?? false)
return (tt.IndAmt ?? 0) - (db.TotalPaid(tt.OrganizationId, tt.PeopleId) ?? 0);
return tt.TotDue ?? 0;
}
示例2: TotalPaid
public decimal TotalPaid(CMSDataContext db)
{
if (totalPaid.HasValue)
return totalPaid.Value;
totalPaid = db.TotalPaid(OrganizationId, PeopleId);
return totalPaid ?? 0;
}
示例3: TotalPaid
public Decimal TotalPaid(CMSDataContext Db)
{
if (totalPaid.HasValue)
return totalPaid.Value;
if (Organization.IsMissionTrip == true)
totalPaid = Db.TotalPaid(OrganizationId, PeopleId);
else
{
var qq = from t in DbUtil.Db.ViewTransactionSummaries
where t.RegId == TranId && t.PeopleId == PeopleId
select t;
var tt = qq.SingleOrDefault();
totalPaid = tt == null ? 0 : tt.IndPaid;
}
return totalPaid ?? 0;
}