示例#1
0
 /// <summary>
 /// Create Packing List
 /// </summary>
 private void PackingListButton_Click(object sender, EventArgs e)
 {
     pathToSaveFiles = fileHandler.GetFolderPathToHandleFiles();
     if (salesInvoiceContent != null && salesInvoiceContent.Count > 0 &&
         documentCreator.ValidateFields(CompanyInformationRichTextBox.Text, BuyerInformationRichTextBox.Text, PalletsTextBox.Text, BoxesTextBox.Text,
                                        WeightTextBox.Text, pathToSaveFiles))
     {
         documentCreator.CreatePackingList(salesInvoiceContent, CompanyInformationRichTextBox.Text, BuyerInformationRichTextBox.Text,
                                           PalletsTextBox.Text, BoxesTextBox.Text, WeightTextBox.Text, pathToSaveFiles);
     }
 }
        /// <summary>
        /// Creates a export packing list(in microsoft excel)
        /// </summary>
        public void CreatePackingList(IDocumentCreator documentCreator, IFileHandler fileHandler, List <InvoiceProductModel> salesInvoiceContent, string companyInformation,
                                      string buyerInformation, string palletsNumber, string boxesNumber, string weight)
        {
            string folderPath = fileHandler.GetFolderPathToHandleFiles();

            if (salesInvoiceContent != null && documentCreator.ValidateFields(companyInformation, buyerInformation, palletsNumber, boxesNumber, weight, folderPath))
            {
                documentCreator.CreatePackingList(salesInvoiceContent, companyInformation, buyerInformation,
                                                  palletsNumber, boxesNumber, weight, folderPath);
            }
        }