/******* get Other Approvement to print ****/ public IList <OtherApprovement> getOtherApprovementToPrint() { OtherApprovement regionalQuality = new OtherApprovement { title = "REGIONAL QUALITY DIRECTOR APPROVAL: REFER TO FTDS-BM-P-008 FOR REQUIREMENT", selectYesNo = this.yesNoReginal.Text, date = this.dateRegional.Value, positionApproval = this.positionRegional.Text, nameApproval = this.nameReginal.Text, signatureApproval = this.signatureRegional.Text, requestApproved = this.requestApprovedRegional.Checked, requestRejected = this.requestRejectedRegional.Checked }; OtherApprovement productEng = new OtherApprovement { title = "PRODUCT ENGINEERING APPROVAL: REFER TO FTDS-BM-P-008 FOR REQUIREMENT", selectYesNo = this.yesNoProductEng.Text, date = this.dateProductEng.Value, positionApproval = this.positionProductEng.Text, nameApproval = this.nameProductEng.Text, signatureApproval = this.signatureProductEng.Text, requestApproved = this.requestApprovedProductEng.Checked, requestRejected = this.requestRejectedProductEng.Checked }; OtherApprovement ManufactEng = new OtherApprovement { title = "MANUFACTURING ENGINEERING APPROVAL: REFER TO FTDS-BM-P-008 FOR REQUIREMENT", selectYesNo = this.yesNoManufactEng.Text, date = this.dateManufactEng.Value, positionApproval = this.positionManufactEng.Text, nameApproval = this.nameManufactEng.Text, signatureApproval = this.signatureManufactEng.Text, requestApproved = this.requestedApprovedManufactEng.Checked, requestRejected = this.requestRejectedManufactEng.Checked }; OtherApprovement customer = new OtherApprovement { title = "CUSTOMER APPROVAL: REFER TO FTDS-BM-P-008 FOR REQUIREMENT", selectYesNo = this.yesNoCustomer.Text, date = this.dateCustomer.Value, positionApproval = this.positionCustomer.Text, nameApproval = this.nameCustomer.Text, signatureApproval = this.signatureCustomer.Text, requestApproved = this.requestApprovedCustomer.Checked, requestRejected = this.requestRejectedCustomer.Checked }; List <OtherApprovement> listOtherApprovement = new List <OtherApprovement>(); listOtherApprovement.Add(regionalQuality); listOtherApprovement.Add(productEng); listOtherApprovement.Add(ManufactEng); listOtherApprovement.Add(customer); return(listOtherApprovement); }
/******** add other(the last part of the deviation) ****/ private PdfPTable createDeviationOtherOneTablePdf(PdfPTable table, OtherApprovement otherApprovement) { // Head cell this.addTableCell(table, otherApprovement.title, normalBold, 6, 0, "#FF0000"); // Yes/No value cell this.addTableCell(table, otherApprovement.selectYesNo, normal, 1, 0, "#ff9900"); // Request Approved value cell this.addTableCell(table, "REQUEST APPROVED", small, 1, 0); // Request Approved value value cell if (otherApprovement.requestApproved) { this.addTableCell(table); } else { this.addTableCell(table, "", small, 1, 0); } // Name cell this.addTableCell(table, "NAME", small, 1, 0); // Name value cell this.addTableCell(table, otherApprovement.nameApproval, small, 4, 0); // REQUEST REJECTED cell this.addTableCell(table, "REQUEST REJECTED", small, 1, 0); // REQUEST REJECTED value value cell if (otherApprovement.requestRejected) { this.addTableCell(table); } else { this.addTableCell(table, "", small, 1, 0); } // SIGNATURE cell this.addTableCell(table, "SIGNATURE", small, 1, 0); // SIGNATURE value cell this.addTableCell(table, otherApprovement.signatureApproval, small, 4, 0); // DATE cell this.addTableCell(table, "DATE", small, 1, 0); // DATEvalue value cell this.addTableCell(table, otherApprovement.date.ToString(), small, 1, 0); // POSITION cell this.addTableCell(table, "POSITION", small, 1, 0); // POSITION value cell this.addTableCell(table, otherApprovement.positionApproval, small, 4, 0); return(table); }