Esempio n. 1
0
 private void PrintButtonProducts_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(NameOfFileProductsUserContolPrint.Text))
     {
         MessageBox.Show("Enter a filename before you print");
     }
     else
     {
         string fileName = NameOfFileProductsUserContolPrint.Text;
         TxtPrinter.Write($"{fileName}", SetupCurrentAsDataTable());
         MessageBox.Show("Data exported");
     }
 }
Esempio n. 2
0
        private void PrintButtonOrders_Click(object sender, EventArgs e)
        {
            string fromdate = FromDateOrders.Text;
            string todate   = ToDateOrders.Text;

            if (string.IsNullOrEmpty(textBoxNameOnPrintFileOrders.Text))
            {
                MessageBox.Show("Enter a filename before you print");
            }
            else
            {
                string fileName = textBoxNameOnPrintFileOrders.Text;
                TxtPrinter.Write($"{fileName}", SetUpCurrentDataTable(), true, fromdate, todate);
                MessageBox.Show("Data exported");
            }
        }
Esempio n. 3
0
        private void PrintCustomersButton_Click(object sender, EventArgs e)
        {
            string fromdate = FromDateCustomer.Text;
            string todate   = ToDateCustomer.Text;

            if (string.IsNullOrEmpty(NameOnFile.Text))
            {
                MessageBox.Show("Enter a filename before you print");
            }
            else
            {
                string fileName = NameOnFile.Text;
                TxtPrinter.Write($"{fileName}", SetupCurrentAsDataTable(), fromdate: fromdate, todate: todate);
                MessageBox.Show("Data exported");
            }
        }