Ejemplo n.º 1
0
        private void toolSession_Click(object sender, EventArgs e)
        {
            classQuery        classQuery = new classQuery();
            classDBConnection classDB    = new classDBConnection();

            //Load Config
            classQuery.LoadConfigDetails();
            //Change directory to RM
            Directory.SetCurrentDirectory(classQuery.rmPath);
            //Execute sessopen.exe
            var process = Process.Start(classQuery.rmPath + "\\sessopen.exe");

            process.WaitForExit();
            //get last current session
            classDB.rmPath = classQuery.rmPath;
            classDB.rmConnect();
            classDB.RMQueries("SELECT TOP 1 session_no, date_start, date_end FROM rep" + DateTime.Today.ToString("yy") + " ORDER BY session_no DESC");
            //MessageBox.Show(classDB.rdr["date_end"].ToString());
            if (!DBNull.Value.Equals(classDB.rdr["date_end"]))
            {
                frmReprocess frmReprocess = new frmReprocess();
                frmReprocess.Show();
            }
            classDB.rmDisconnect();
        }
Ejemplo n.º 2
0
        private void frmConfig_Load(object sender, EventArgs e)
        {
            //loadData
            classQuery.LoadConfigDetails();
            txtAdminPass.Text      = classQuery.adminPass;
            txtUserPass.Text       = classQuery.userPass;
            txtRMPath.Text         = classQuery.rmPath;
            txtPrinterPath.Text    = classQuery.printerPath;
            txtTenantCode.Text     = classQuery.tenantCode;
            txtTenantName.Text     = classQuery.tenantName;
            txtContractNumber.Text = classQuery.tenantContract;
            txtAyalaFolder.Text    = classQuery.ayalaFolder;

            classQuery.LoadTaxMap();
            dgwTaxTable.DataSource       = classQuery.dtTax;
            dgwTaxTable.Columns[0].Width = 80;
            dgwTaxTable.Columns[1].Width = 70;
            dgwTaxTable.Columns[2].Width = 70;
            classQuery.dtTax.Dispose();

            classQuery.LoadDiscount();
            dgwDiscountNonVat.DataSource       = classQuery.dtDiscount;
            dgwDiscountNonVat.Columns[0].Width = 70;
            dgwDiscountNonVat.Columns[1].Width = 70;
            classQuery.dtTax.Dispose();

            classQuery.LoadLessVAT();
            dgwLessVAT.DataSource       = classQuery.dtLessVAT;
            dgwLessVAT.Columns[0].Width = 70;
            dgwLessVAT.Columns[1].Width = 70;
            classQuery.dtLessVAT.Dispose();

            classQuery.LoadDiplomat();
            dgwDiplomat.DataSource       = classQuery.dtDiplomat;
            dgwDiplomat.Columns[0].Width = 70;
            dgwDiplomat.Columns[1].Width = 70;
            classQuery.dtDiplomat.Dispose();

            classQuery.LoadTerminal();
            dgwTerminal.DataSource       = classQuery.dtTerminal;
            dgwDiplomat.Columns[0].Width = 70;
            classQuery.dtTerminal.Dispose();
        }