Beispiel #1
0
        private void PrintGrid(GridControl grid)
        {
            string tempFile = AppConfig.GetTempDirectory() + Database.GetGlobalKey() + ".xls";

            string customer = GetCustomerNo();
            string strDate  = GetOrderDate();

            ExportInvoice.ExportInvioceTotal(editView, customer, strDate, tempFile);

            if (System.IO.File.Exists(tempFile))
            {
                System.Diagnostics.Process.Start(tempFile);
            }
        }
Beispiel #2
0
        private void ExportGrid()
        {
            SaveFileDialog fileDialog = new SaveFileDialog();

            fileDialog.Title  = "导出Excel";
            fileDialog.Filter = "Excel (*.xls)|*.xls";
            DialogResult dialogResult = fileDialog.ShowDialog(this);

            if (dialogResult == DialogResult.OK)
            {
                string customer = GetCustomerNo();
                string strDate  = GetOrderDate();

                ExportInvoice.ExportInvioceTotal(editView, customer, strDate, fileDialog.FileName);

                if (System.IO.File.Exists(fileDialog.FileName))
                {
                    System.Diagnostics.Process.Start(fileDialog.FileName);
                }
            }
        }