Exemplo n.º 1
0
        /// <summary>
        /// Add header for document receipt
        /// </summary>
        /// <param name="streamWriter">Stream writer to write the text file.</param>
        /// <param name="stockIssuesEntity"></param>
        /// <param name="isDuplicate"></param>
        public void AddDocHeaderForIssues(StreamWriter streamWriter, DocumentStockIssuesEntity stockIssuesEntity, bool isDuplicate = false)
        {
            streamWriter.WriteLine("---------------------------------------------------------------------------------------------------------------");
            streamWriter.WriteLine("|                                                                                                             |");
            streamWriter.WriteLine("|                                                                                                             |");
            streamWriter.WriteLine("|                                          TAMILNADU CIVIL SUPPLIES CORPORATION                               |");
            streamWriter.Write("|                                              ");
            streamWriter.Write(report.StringFormatWithoutPipe("REGION : ", 9, 1));
            streamWriter.Write(report.StringFormat(stockIssuesEntity.RegionName, 53, 2));
            streamWriter.WriteLine("");
            streamWriter.WriteLine("|                                                                                                             |");
            streamWriter.WriteLine("|                                                                                                             |");
            if (isDuplicate)
            {
                streamWriter.WriteLine("|                                      STOCK ISSUE - ISSUE MEMO                DUPLICATE COPY                 |");
            }
            else
            {
                streamWriter.WriteLine("|                                      STOCK ISSUE - ISSUE MEMO                                               |");
            }
            streamWriter.WriteLine("|-------------------------------------------------------------------------------------------------------------|");
            streamWriter.Write("|ISSUE MEMO NO  :   ");
            streamWriter.Write(report.StringFormatWithoutPipe(stockIssuesEntity.SINo, 21, 2));
            streamWriter.Write("DATE: ");
            streamWriter.Write(report.StringFormatWithoutPipe(report.FormatDate(stockIssuesEntity.SIDate.ToString()), 12, 2));
            streamWriter.Write("TIME:");
            streamWriter.Write(report.StringFormatWithoutPipe(report.GetCurrentTime(DateTime.Now), 14, 2));
            streamWriter.Write(report.StringFormatWithoutPipe((stockIssuesEntity.IssueRegularAdvance.ToUpper() == "R" ? "REGULAR" : "ADVANCE"), 8, 2));
            streamWriter.Write(report.StringFormat(stockIssuesEntity.IRelates, 20, 2));
            streamWriter.WriteLine(" ");

            streamWriter.Write("|ISSUING GODOWN :   ");
            streamWriter.Write(report.StringFormatWithoutPipe(stockIssuesEntity.GodownName, 21, 2));
            streamWriter.Write(report.StringFormatWithoutPipe("TO WHOM ISSUED:", 15, 1));
            streamWriter.Write(report.StringFormatWithoutPipe(stockIssuesEntity.ReceiverName, 51, 2));
            streamWriter.Write("|");
            streamWriter.WriteLine(" ");
            try
            {
                streamWriter.Write("|                                         ");
                streamWriter.Write(report.StringFormatWithoutPipe("ISSUER CODE  :", 15, 1));
                streamWriter.Write(report.StringFormatWithoutPipe(stockIssuesEntity.IssuerCode, 51, 2));
                streamWriter.Write("|");
                streamWriter.WriteLine(" ");
            }
            catch (Exception ex)
            {
                AuditLog.WriteError(ex.Message);
            }
            streamWriter.WriteLine("||------------------------------------------------------------------------------------------------------|-----|");
            streamWriter.WriteLine("||SNo|  STACK NO  |    COMMODITY                  |  SCHEME      |UNIT WEIGHT  |NO.OFUNITS|   NET Wt/Nos|MOI% |");
            streamWriter.WriteLine("||------------------------------------------------------------------------------------------------------|-----|");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Add header for document receipt
        /// </summary>
        /// <param name="streamWriter">Stream writer to write the text file.</param>
        /// <param name="truckMemoList"></param>
        /// <param name="isDuplicate"></param>
        public void AddDocHeaderForTruckMemo(StreamWriter streamWriter, DocumentStockTransferDetails truckMemoList, bool isDuplicate = false)
        {
            streamWriter.WriteLine("|----------------------------------------------------------------------------------------------------------|");
            streamWriter.WriteLine("|                                                                                                          |");
            streamWriter.WriteLine("|                                                                                                          |");
            streamWriter.WriteLine("|                                       TAMILNADU CIVIL SUPPLIES CORPORATION                               |");
            streamWriter.Write("|                                           ");
            streamWriter.Write(report.StringFormatWithoutPipe("REGION : ", 9, 1));
            streamWriter.Write(report.StringFormat(truckMemoList.RegionName, 53, 2));
            streamWriter.WriteLine("");
            streamWriter.WriteLine("|                                                                                                          |");
            streamWriter.WriteLine("|                                                                                                          |");
            if (isDuplicate)
            {
                streamWriter.WriteLine("|                                      STOCK ISSUE TRUCK MEMO            DUPLICATE COPY                    |");
            }
            else
            {
                streamWriter.WriteLine("|                                      STOCK ISSUE TRUCK MEMO                                              |");
            }
            streamWriter.WriteLine("|----------------------------------------------------------------------------------------------------------|");
            streamWriter.Write("|TRUCK MEMO NO:");
            streamWriter.Write(report.StringFormatWithoutPipe(truckMemoList.STNo, 21, 2));
            streamWriter.Write("ALLOTMENT/RELEASE ORDER: ");
            streamWriter.Write(report.StringFormatWithoutPipe(truckMemoList.RNo, 12, 2));
            streamWriter.Write("MOVE. ORDER NO: ");
            streamWriter.Write(report.StringFormatWithoutPipe(truckMemoList.MNo, 15, 2));
            streamWriter.Write("|");
            streamWriter.WriteLine(" ");

            streamWriter.Write("|              DATE:");
            streamWriter.Write(report.StringFormatWithoutPipe(report.FormatDate(truckMemoList.STDate.ToString()), 21, 2));
            streamWriter.Write(report.StringFormatWithoutPipe("TIME: ", 25, 1));
            streamWriter.Write(report.StringFormatWithoutPipe(report.GetCurrentTime(DateTime.Now), 16, 2));
            streamWriter.Write("DATE:");
            streamWriter.Write(report.StringFormatWithoutPipe(report.FormatDate(truckMemoList.RDate.ToString()), 16, 2));
            streamWriter.Write("|");
            streamWriter.WriteLine(" ");

            streamWriter.Write("|ISSUING GODOWN   :");
            streamWriter.Write(report.StringFormatWithoutPipe(truckMemoList.GodownName, 30, 2));
            streamWriter.Write("RECEIVER NAME: ");
            streamWriter.Write(report.StringFormatWithoutPipe(truckMemoList.ReceivingName, 41, 2));
            streamWriter.Write("|");
            streamWriter.WriteLine(" ");

            streamWriter.WriteLine("|----------------------------------------------------------------------------------------------------------|");
            streamWriter.WriteLine("||--------------------------------------------------------------------------------------------------------||");
            streamWriter.WriteLine("||SNo |STACK NO   |COMMODITY           | SCHEME       |UNIT WEIGHT  |NO.OF |  Gross        NET   |% OF    ||");
            streamWriter.WriteLine("||    |           |                    |              |             |  UNIT|   WEIGHT in Kgs/NOs |MOISTURE||");
            streamWriter.WriteLine("||--------------------------------------------------------------------------------------------------------||");
        }
Exemplo n.º 3
0
        /// <summary>
        /// Add footer for document receipt
        /// </summary>
        /// <param name="streamWriter"></param>
        /// <param name="stockReceipt"></param>
        public void AddFooter(StreamWriter streamWriter, DocumentStockReceiptList stockReceipt)
        {
            //GetDate()
            ManageSQLConnection manageSQL = new ManageSQLConnection();
            DateTime            dateTime  = manageSQL.GetSRTime(stockReceipt.SRNo);

            streamWriter.WriteLine("|----------------------------------------------------------------------------------------------------------|");
            streamWriter.Write("|T.MEMO/IN.NO:");
            streamWriter.Write(report.StringFormatWithoutPipe(stockReceipt.TruckMemoNo, 19, 2));
            streamWriter.Write("LORRY NO      : ");
            streamWriter.Write(report.StringFormatWithoutPipe(stockReceipt.LNo, 14, 2));
            streamWriter.Write("TC NAME       : ");
            streamWriter.Write(report.StringFormatWithoutPipe(stockReceipt.TransporterName, 25, 2));
            streamWriter.Write("|");
            streamWriter.WriteLine(" ");
            streamWriter.Write("|T.MEMO/IN.DT:");
            streamWriter.Write(report.StringFormatWithoutPipe(report.FormatDate(stockReceipt.TruckMemoDate.ToString()), 19, 2));
            streamWriter.Write("LORRY FROM    : ");
            streamWriter.Write(report.StringFormatWithoutPipe(stockReceipt.LFrom, 56, 2));
            streamWriter.Write("|");
            streamWriter.WriteLine(" ");
            streamWriter.WriteLine("|                                                                                                          |");
            streamWriter.Write("|MODE OF WEIGHMENT: ");
            streamWriter.Write(report.StringFormatWithoutPipe(GetWTCode(stockReceipt), 13, 2));
            streamWriter.Write("WAGON NO      : ");
            streamWriter.Write(report.StringFormatWithoutPipe("-", 14, 2));
            streamWriter.Write("RR NO         : ");
            streamWriter.Write(report.StringFormatWithoutPipe(stockReceipt.MTransport, 25, 2));
            streamWriter.Write("|");
            streamWriter.WriteLine(" ");
            streamWriter.WriteLine("|                                                                                                          |");
            streamWriter.WriteLine("|" + report.StringFormatWithoutPipe(GlobalVariable.FSSAI1, 105, 2) + "|");
            streamWriter.WriteLine("|" + report.StringFormatWithoutPipe(GlobalVariable.FSSAI2, 105, 2) + "|");
            streamWriter.WriteLine("|" + report.StringFormatWithoutPipe(GlobalVariable.FSSAI3, 105, 2) + "|");
            streamWriter.WriteLine("|                                                                                                          |");
            streamWriter.WriteLine("|  Sign. of the Authorised Person.                                            GODOWN INCHARGE              |");
            streamWriter.WriteLine("|                                                                                                          |");
            streamWriter.WriteLine("|REMARKS                                                                                                   |");
            streamWriter.WriteLine("|   " + report.StringFormatWithoutPipe(stockReceipt.Remarks, 102, 2) + "|");
            report.AddMoreContent(streamWriter, stockReceipt.Remarks, 102, 3);
            streamWriter.WriteLine("|----------------------------------------------------------------------------------------------------------|");
            string receiptDateTime = report.FormatDate(stockReceipt.SRDate.ToString()) + " " + report.GetCurrentTime(dateTime);

            streamWriter.WriteLine(" Prepared DateTime:" + receiptDateTime + "       Printing DateTime:" + DateTime.Now.ToString("dd-MMM-yyyy hh:mm:ss"));
            streamWriter.WriteLine((char)12);
        }
Exemplo n.º 4
0
        public void AddFooter(iTextSharp.text.Document doc, DocumentStockReceiptList stockReceipt)
        {
            //GetDate()
            ManageSQLConnection manageSQL = new ManageSQLConnection();
            DateTime            dateTime  = manageSQL.GetSRTime(stockReceipt.SRNo);
            string    receiptDateTime     = report.FormatDate(stockReceipt.SRDate.ToString()) + " " + report.GetCurrentTime(dateTime);
            Paragraph FSSAI = new Paragraph("  Prepared DateTime:" + receiptDateTime + "      Download DateTime:" + DateTime.Now.ToString("dd-MMM-yyyy hh:mm:ss") + "   User : " + stockReceipt.UserID, NormalFont);

            FSSAI.Alignment = Element.ALIGN_LEFT;
            doc.Add(FSSAI);
        }