Пример #1
0
        private void btnRun_Click(object sender, EventArgs e)
        {
            myClass myclass = new myClass();
            try
            {
                //myclass.company = RBMMM.Checked ? "MMM" : "PMC";
                myclass.is1500 = RB1500.Checked ? true : false;
                toolStripProgressBar1.Value = 0;
                this.Enabled = false;

                if (RBFP.Checked)
                {//is FP
                    if (myclass.runFP(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiff(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "v1pagina", "99");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
                else if (RBMMM.Checked)
                {//IS MMM
                    myclass.company = "MMM";
                    if (myclass.run(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiff(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "V1CROSSREF", "0000");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                    }
                }
                else if (RBPMC.Checked)
                {// IS PMC
                    myclass.company = "PMC";
                    if (myclass.run(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiff(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "V1CROSSREF", "0000");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                } else if (rdbPSGMMM.Checked)
                {//psgmmm
                    myclass.company = "PSGMMM";
                    if (myclass.runPSG(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1,"00"))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiffPSG(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "V1CROSSREF", "00");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones + "\r\n" +
                                        "Total de Imagenes:" + myclass._totalmg + "\r\n" +
                                        "Total de CrossRef:" + myclass._TotalCrossRef
                            , "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }

                }
                else if (rdbPSGPMC.Checked)
                {//psgpmc
                    myclass.company = "PSGPMC";
                    if (myclass.runPSG(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1,"00"))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiffPSG(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "V1CROSSREF", "00");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones + "\r\n" +
                                        "Total de Imagenes:" + myclass._totalmg + "\r\n" +
                                        "Total de CrossRef:" + myclass._TotalCrossRef
                            , "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
                else if (rdbPSGMMM_OnGoing.Checked)
                {
                    myclass.company = "PSGMMM";

                    if (myclass.runPSG_ONGOING(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1,"00"))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiff(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "V1CROSSREF", "00");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones + "\r\n" +
                                        "Total de Imagenes:" + myclass._totalmg + "\r\n" +
                                        "Total de CrossRef:" + myclass._TotalCrossRef
                            , "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
                else if (rdbPSGPMC_OnGoing.Checked)
                {
                    myclass.company = "PSGPMC";
                    if (myclass.runPSG_ONGOING(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1,"00"))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiff(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "V1CROSSREF", "00");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones + "\r\n" +
                                        "Total de Imagenes:" + myclass._totalmg + "\r\n" +
                                        "Total de CrossRef:" + myclass._TotalCrossRef
                            , "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }

                else if (rdbPSGPMC_OnGoing_NO_CLM.Checked)
                {
                    myclass.company = "PSGPMC";
                    if (myclass.runPSG_ONGOING_NO_CLM(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1, "00"))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiff(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "V1CROSSREF", "00");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones + "\r\n" +
                                        "Total de Imagenes:" + myclass._totalmg + "\r\n" +
                                        "Total de CrossRef:" + myclass._TotalCrossRef
                            , "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }

                else if (rdbPSGMMM_OnGoing_NO_CLM.Checked)
                {
                    myclass.company = "PSGMMM";
                    if (myclass.runPSG_ONGOING_NO_CLM(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1, "00"))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiff(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "V1CROSSREF", "00");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones + "\r\n" +
                                        "Total de Imagenes:" + myclass._totalmg + "\r\n" +
                                        "Total de CrossRef:" + myclass._TotalCrossRef
                            , "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }

                else if (RDBPSGMMMIDX.Checked)
                {
                    myclass.company = "PSGMMM";
                    if (myclass.runPSGIDX(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1, "00"))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiffPSGIDX(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "V1CROSSREF", "00");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones + "\r\n" +
                                        "Total de Imagenes:" + myclass._totalmg + "\r\n" +
                                        "Total de CrossRef:" + myclass._TotalCrossRef
                            , "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
                else if (RDBPSGPMCIDX.Checked)
                {
                    myclass.company = "PSGPMC";
                    if (myclass.runPSGIDX(txtDbNAme.Text, txtDatName.Text, txtLineaServ.Text.Trim(), toolStripProgressBar1, toolStripLabel1, "00"))
                    {
                        toolStripProgressBar1.Value = 0;
                        if (chkStaping.Checked)
                        {
                            myclass.multiTiffPSGIDX(txtIn.Text, txtImgDes.Text, txtDbNAme.Text, toolStripProgressBar1, toolStripLabel1, "V1CROSSREF", "00");
                            MessageBox.Show("Total de Imagenes:" + myclass._totalmg, "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                        MessageBox.Show("Total de Reclamaciones:" + myclass._totalReclamaciones + "\r\n" +
                                        "Total de Imagenes:" + myclass._totalmg + "\r\n" +
                                        "Total de CrossRef:" + myclass._TotalCrossRef
                            , "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
                else
                {
                    throw new Exception("Error con la compañia");
                }

                MessageBox.Show("Done...", "ImageData, Inc.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                myclass = null;
                this.Enabled = true;
            }
        }