Example #1
0
        private void CheckProcess()
        {
            CheckServices      checks  = new CheckServices();
            ProcessPackingText packing = new ProcessPackingText();
            //  checks.DeletePrinterAndTextFile();
            // checks.DeleteTextFile();
            List <CheckModel> pL       = new List <CheckModel>();
            List <CheckModel> docheck  = new List <CheckModel>();
            List <CheckModel> pcheck   = new List <CheckModel>();
            List <CheckModel> dbfcheck = new List <CheckModel>();
            List <CheckModel> mdbcheck = new List <CheckModel>();
            List <CheckModel> zipchek  = new List <CheckModel>();
            ZipFileServices   z        = new ZipFileServices();

            packing.PackingText(pL, this);
            checks.ProcessCheck(docheck, this);
            checks.PrinterFile(pcheck, this);
            checks.SaveToPackingDBF(dbfcheck, _batchfile, this);
            for (int i = 0; i < docheck.Count; i++)
            {
                if (docheck[i].ChkType == "MC" || docheck[i].ChkType == "MC_CONT")
                {
                    //dbconnection.MDBCreate();
                    dbconnection.DeleteMDB();
                    dbconnection.CreateTable(_batchfile);
                }
                dbconnection.SavedDatatoDatabase(docheck[i], _batchfile);
            }
            if (_checkModel.ChkType == "MC" || _checkModel.ChkType == "MC_CONT")
            {
                checks.Insert4Outs(mdbcheck, this);
            }

            dbconnection.DumpMySQL();
            //   ZipFileServices.CopyPrinterFile(checktype, _mainForm);
            z.ZipFileS(frmLogIn._userName);

            //dbconnection.Backup();
            MessageBox.Show("Process Done!!!");

            dbconnection.DeleteTempData();
            Environment.Exit(0);
        }