本文整理汇总了C#中HandlebarsDotNet.HelperOptions类的典型用法代码示例。如果您正苦于以下问题:C# HelperOptions类的具体用法?C# HelperOptions怎么用?C# HelperOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HelperOptions类属于HandlebarsDotNet命名空间,在下文中一共展示了HelperOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Registrant
private void Registrant(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
options.Template(writer, new
{
OrgMember.Person.Name,
OrgMember.Organization.OrganizationName,
});
}
示例2: IfAskTickets
private void IfAskTickets(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (currentAsk.IsAskTickets)
options.Template(writer, OrgMember);
}
示例3: IfAskTextQuestions
private void IfAskTextQuestions(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (!currentAsk.IsAskText)
return;
var list = Person.Text[((AskText)currentAsk).UniqueId].Where(a => a.Value.HasValue()).ToList();
if (!list.Any())
return;
var lastKey = list.Last().Key;
foreach (var item in list)
{
RowStyle = lastKey == item.Key ? CssStyle.BottomBorder : CssStyle.PadBottom;
options.Template(writer, new
{
Question = item.Key,
Answer = item.Value,
});
}
}
示例4: IfAskSms
private void IfAskSms(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (currentAsk.IsAskSms)
options.Template(writer, new { Person.person.ReceiveSMS });
}
示例5: IfAskRequest
private void IfAskRequest(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (!currentAsk.IsAskRequest)
return;
options.Template(writer, new
{
((AskRequest)currentAsk).Label,
OrgMember.Request,
});
}
示例6: IfAskSms
private void IfAskSms(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (!currentAsk.IsAskSms)
return;
if (Person.person == null)
Person.person = db.LoadPersonById(Person.PeopleId);
options.Template(writer, new { Person.person.ReceiveSMS });
}
示例7: IfSupportMissionTrip
private void IfSupportMissionTrip(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (!SupportMissionTrip)
return;
var Goer = db.LoadPersonById(Person.MissionTripGoerId ?? 0);
options.Template(writer, new
{
Goer,
HasGoer = Person.MissionTripGoerId > 0,
HasGeneralSupport = Person.MissionTripSupportGeneral > 0,
});
}
示例8: IfHasAgeGroups
private void IfHasAgeGroups(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (Person.setting.AgeGroups.Count == 0)
return;
options.Template(writer, new { AgeGroup = Person.AgeGroup() });
}
示例9: IfAskGradeOptions
private void IfAskGradeOptions(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (currentAsk.IsAskGradeOptions)
options.Template(writer, new { GradeOption = Person.GradeOptions(currentAsk)[Person.gradeoption ?? "00"] });
}
示例10: IfAskDropdown
private void IfAskDropdown(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (currentAsk.IsAskDropdown)
options.Template(writer, new
{
OptionsLabel = Util.PickFirst(((AskDropdown)currentAsk).Label, "Options"),
SubGroupChoice = ((AskDropdown)currentAsk).SmallGroupChoice(Person.option).Description,
});
}
示例11: IfAskChurch
private void IfAskChurch(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (!currentAsk.IsAskChurch)
return;
var recReg = OrgMember.Person.GetRecReg();
options.Template(writer, new
{
ShowNotMember = recReg.Member == true ? "" : "Not",
ShowNotActive = recReg.ActiveInAnotherChurch == true ? "" : "Not",
});
}
示例12: Checkboxes
private void Checkboxes(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (!currentAsk.IsAskCheckboxes)
return;
var list = ((AskCheckboxes)currentAsk).CheckboxItemsChosen(Person.Checkbox).ToList();
if (!list.Any())
return;
var lastDesc = list.Last().Description;
foreach (var item in list)
{
RowStyle = lastDesc == item.Description ? "" : CssStyle.PadBottom;
options.Template(writer, new
{
DisplayDescription = item.Fee > 0
? $"{item.Description} (${item.Fee.ToString2("N2")}<br/>({item.SmallGroup})"
: $"{item.Description}<br/>({item.SmallGroup})",
});
}
}
示例13: AskItems
private void AskItems(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (SupportMissionTrip)
return;
var list = Person.setting.AskItems;
if (!list.Any())
return;
foreach (var item in list)
{
currentAsk = item;
options.Template(writer, item);
}
}
示例14: IfShowTransaction
private void IfShowTransaction(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
var ti = db.Transactions.SingleOrDefault(tt => tt.Id == OrgMember.TranId);
if (ti == null || (ti.Amt ?? 0) == 0)
return;
var ts = OrgMember.TransactionSummary(db);
var amtFee = (ts.IndPaid + ts.IndDue);
var amtDonation = ts.IndAmt - amtFee;
var info = new
{
AmtFee = amtFee.ToString2("c"),
AmtDonation = amtDonation.ToString2("c"),
AmtPaid = OrgMember.AmountPaidTransactions(db).ToString2("c"),
AmtDue = OrgMember.AmountDueTransactions(db).ToString2("c"),
HasDonation = amtDonation.HasValue,
};
options.Template(writer, info);
}
示例15: IfAskTylenolEtc
private void IfAskTylenolEtc(TextWriter writer, HelperOptions options, dynamic context, params object[] args)
{
if (currentAsk.IsAskTylenolEtc)
options.Template(writer, new
{
Tylenol = Person.tylenol == true ? "Yes" : "No",
Advil = Person.advil == true ? "Yes" : "No",
Maalox = Person.maalox == true ? "Yes" : "No",
Robitussin = Person.robitussin == true ? "Yes" : "No",
});
}