Пример #1
0
        private void btnRun_Click(object sender, EventArgs e)
        {
            try
            {
                this.Enabled = false;
                toolStripProgressBar1.Value = 0;
                String server = GetRegistry.Registry.read(Program.RegKey, "server");
                String database = GetRegistry.Registry.read(Program.RegKey, "database");
                String uid = encryptQueryString.Encrypt.DecryptText(GetRegistry.Registry.read(Program.RegKey, "uid"));
                String password = encryptQueryString.Encrypt.DecryptText(GetRegistry.Registry.read(Program.RegKey, "password"));

                switch (this.Text)
                {
                    case "MMM 837I":
                        {
                            String countMMM = GetRegistry.Registry.read(Program.RegKey, "Count_MMM_837");
                            String table = GetRegistry.Registry.read(Program.RegKey, "Table_MMM_837I");

                            MMM clsMMM = new MMM(server, database, uid, password);

                            toolStripProgressBar1.Value = 0;
                            clsMMM.run(txtFox.Text.Trim(), txtFileOutPut.Text.Trim(), "019999999", "tblMemberMMM", table, "tblProvider", "MMM", this.lblTotal, this.lblCount, toolStripProgressBar1, toolStripStatusLabel1, dataGridView1, countMMM);
                        }
                        break;
                    case "PMC 837I":
                        {
                            String countPMC = GetRegistry.Registry.read(Program.RegKey, "Count_PMC_837");
                            String table = GetRegistry.Registry.read(Program.RegKey, "Table_PMC_837I");

                            MMM clsPMC = new MMM(server, database, uid, password);
                            toolStripProgressBar1.Value = 0;
                            clsPMC.run(txtFox.Text.Trim(), txtFileOutPut.Text, "039999999", "tblMemberPMC", table, "tblProvider_PMC", "PMC", this.lblTotal, this.lblCount, toolStripProgressBar1, toolStripStatusLabel1, dataGridView1, countPMC);
                        }
                        break;
                }
                MessageBox.Show("Done...", "Done", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                this.Enabled = true;
            }
        }
Пример #2
0
        private void btnLoadData_Click(object sender, EventArgs e)
        {
            try
            {
                switch (this.Text)
                {
                    case "MMM 837I":
                        {

                            MMM clsMMM = new MMM();

                            clsMMM.loadData(txtFox.Text, lblTotal, dataGridView1);

                        }
                        break;
                    case "PMC 837I":
                        {

                            MMM clsPMC = new MMM();
                            clsPMC.loadData(txtFox.Text, lblTotal, dataGridView1);
                        }
                        break;
                }
                MessageBox.Show("Done...");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }