本文整理匯總了C#中iTextSharp.text.List.Min方法的典型用法代碼示例。如果您正苦於以下問題:C# List.Min方法的具體用法?C# List.Min怎麽用?C# List.Min使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類iTextSharp.text.List
的用法示例。
在下文中一共展示了List.Min方法的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;
//.........這裏部分代碼省略.........