Exemplo n.º 1
0
 private void tsmExport_Click(object sender, EventArgs e)
 {
     savefdExport.Filter     = "Excel (*.xlsx)|*.xlsx";
     savefdExport.DefaultExt = "xlsx";
     savefdExport.FileName   = "SkladOriflame_BackUp_" + DateTime.Now.Date.ToString("yyyy_MM_dd") + ".xlsx";
     //savefdExport.InitialDirectory = Environment.CurrentDirectory;
     if (savefdExport.ShowDialog() == DialogResult.OK && savefdExport.FileName.Length > 0)
     {
         ImportExport.Export(savefdExport.FileName);
     }
 }
Exemplo n.º 2
0
        private void tsmImport_Click(object sender, EventArgs e)
        {
            openfdImport.Filter     = "Excel (*.xlsx)|*.xlsx";
            openfdImport.DefaultExt = "xlsx";
            if (openfdImport.ShowDialog() == DialogResult.OK && File.Exists(openfdImport.FileName))
            {
                ImportExport.Import(openfdImport.FileName);

                CatalogType.MakeList();
                Category.MakeList();
                CatalogPeriod.MakeList();
                Catalog.MakeList();
                dgvMain.DataSource = SkladBase.SearchProdByCode(tbCode.Text);
            }
        }