本文整理汇总了C#中iTextSharp.text.List.Max方法的典型用法代码示例。如果您正苦于以下问题:C# List.Max方法的具体用法?C# List.Max怎么用?C# List.Max使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iTextSharp.text.List
的用法示例。
在下文中一共展示了List.Max方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReportBuilder
private static void ReportBuilder(List<SHPaySumListItem> stateList, int cropYear, string statementDate, string shid,
string fromShid, string toShid, int paymentDescID, bool isCumulative, string rptFooter, string logoUrl, FileStream fs)
{
const string METHOD_NAME = "rptPaymentSummary.ReportBuilder: ";
Document document = null;
PdfWriter writer = null;
PdfPTable table = null;
PaymentSummaryEvent pgEvent = null;
iTextSharp.text.Image imgLogo = null;
decimal totalTons = 0;
decimal totalEHPrem = 0;
decimal totalGross = 0;
decimal totalDeductions = 0;
decimal totalNet = 0;
decimal totalGrowerNet = 0;
decimal totalLandownerNet = 0;
decimal checkAmount = 0;
int resetFlag = 0;
int checkSequence = 0;
int payeeNumber = 0;
string rptTitle = "Western Sugar Cooperative Payment Summary";
Font headerFont = FontFactory.GetFont("HELVETICA", 8F, Font.NORMAL);
Font normalFont = FontFactory.GetFont("HELVETICA", 8F, Font.NORMAL);
Font labelFont = FontFactory.GetFont("HELVETICA", 8F, Font.BOLD);
try {
int firstContractNumber = stateList.Min(c => c.i_ContractNumber);
int lastContractNumber = stateList.Max(c => c.i_ContractNumber);
List<TransDeductionListItem> deductionList = WSCPayment.GetTransmittalDeduction2(ConfigurationManager.ConnectionStrings["BeetConn"].ToString(),
cropYear, paymentDescID, 0, firstContractNumber, lastContractNumber, isCumulative);
foreach (SHPaySumListItem item in stateList) {
if (document == null) {
// IF YOU CHANGE MARGINS, CHANGE YOUR TABLE LAYOUTS !!!
// *** US LETTER: 612 X 792 ***
//document = new Document(iTextSharp.text.PageSize.LETTER, 36, 36, 54, 72);
document = new Document(PortraitPageSize.PgPageSize, PortraitPageSize.PgLeftMargin,
PortraitPageSize.PgRightMargin, PortraitPageSize.PgTopMargin, PortraitPageSize.PgBottomMargin);
// we create a writer that listens to the document
// and directs a PDF-stream to a file
writer = PdfWriter.GetInstance(document, fs);
imgLogo = PdfReports.GetImage(logoUrl, 127, 50, iTextSharp.text.Element.ALIGN_CENTER);
// Attach my override event handler(s)
checkSequence = item.i_CheckSequence;
pgEvent = new PaymentSummaryEvent();
pgEvent.FillEvent(item, cropYear, statementDate, resetFlag, rptTitle, imgLogo);
writer.PageEvent = pgEvent;
pgEvent.HeaderNameList = _detailSectionHdrNames;
pgEvent.HeaderTableLayout = _primaryTableLayout;
// Open the document
document.Open();
pgEvent.HeaderTableLayout = null;
table = PdfReports.CreateTable(_primaryTableLayout, 1);
checkAmount = item.d_checkAmount;
payeeNumber = item.i_Payee_Number;
} else {
if (checkSequence != item.i_CheckSequence) {
AddTotals(ref writer, ref document, ref table, labelFont, normalFont, totalTons,
totalEHPrem, totalGross, totalDeductions, totalNet, checkAmount,
payeeNumber, totalGrowerNet, totalLandownerNet, pgEvent);
AddFooter(ref writer, ref document, normalFont, rptFooter, pgEvent);
// Clear totals values
totalTons = 0;
totalEHPrem = 0;
totalGross = 0;
totalDeductions = 0;
totalNet = 0;
totalGrowerNet = 0;
totalLandownerNet = 0;
checkSequence = item.i_CheckSequence;
// NEW CHECK
pgEvent.FillEvent(item, cropYear, statementDate, resetFlag, rptTitle, imgLogo);
pgEvent.HeaderTableLayout = _primaryTableLayout;
document.NewPage();
pgEvent.HeaderTableLayout = null;
table = PdfReports.CreateTable(_primaryTableLayout, 1);
checkAmount = item.d_checkAmount;
payeeNumber = item.i_Payee_Number;
//.........这里部分代码省略.........