Пример #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
            if (DateTime.Now.Month == 1)
            {
                dtpInicial.Value = new DateTime(DateTime.Now.Year - 1, 12, 1);
            }
            else
            {
                dtpInicial.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month - 1, 1);
            }
            dtpFinal.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.DaysInMonth(DateTime.Today.Year, DateTime.Today.Month));

            //dtpInicial.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
            //dtpFinal.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);//DateTime.DaysInMonth(DateTime.Today.Year, DateTime.Today.Month));
            if (!Directory.Exists(this.strCaminhoArqTemp))
            {
                Directory.CreateDirectory(this.strCaminhoArqTemp);
            }

            Unidades.carregarUnidades(Settings1.Default.caminho_labol + "\\TABELAS.LAB");
            this.copiarArquivos(Settings1.Default.caminho_labol + "\\CLIENTES.LAB", this.strCaminhoArqTemp + "\\CLIENTES.LAB");
            this.copiarArquivos(Settings1.Default.caminho_labol + "\\TEXAS.LAB", this.strCaminhoArqTemp + "\\TEXAS.LAB");
            this.copiarArquivos(Settings1.Default.caminho_labol + "\\XEXAS.LAB", this.strCaminhoArqTemp + "\\XEXAS.LAB");
            this.copiarArquivos(Settings1.Default.caminho_labol + "\\TEXTAB.LAB", this.strCaminhoArqTemp + "\\TEXTAB.LAB");
        }