Beispiel #1
0
        private void m_btCarregaDados_Click(object sender, System.EventArgs e)
        {
            CreateDataBase();
            m_txtRetorno.Text = "";

            // Campo
            Object obj = m_cbCampo.ReturnObjectSelectedItem();

            if (obj != null)
            {
                int nIdCampoBD = Int32.Parse(obj.ToString());
                mdlRelatoriosCallBack.clsRelatoriosCallBack callBack = new mdlRelatoriosCallBack.clsRelatoriosCallBack(ref m_cls_tre_tratadorErro, ref m_cls_dba_ConnectionBD, m_txtPath.Text, Int32.Parse(m_txtIdExportador.Text), m_txtIdCodigo.Text);
                // Pagina
                callBack.Pagina = Int32.Parse(m_txtPagina.Text);
                object objRel = m_cbRelatorio.ReturnObjectSelectedItem();
                if (objRel != null)
                {
                    callBack.TipoRelatorio = Int32.Parse(objRel.ToString());
                }
                // Idioma
                Object objIdioma = m_cbIdioma.ReturnObjectSelectedItem();
                if (objIdioma != null)
                {
                    callBack.Idioma = Int32.Parse(objIdioma.ToString());
                }

                // Lista de Bandeiras
                callBack.ListaBandeiras = m_ilBandeiras;

                System.DateTime dttmAntes = System.DateTime.Now;
                m_txtRetorno.Text = callBack.strCarregaDados(nIdCampoBD);
                this.Text         = "Tempo = " + System.DateTime.Now.Subtract(dttmAntes).TotalMilliseconds.ToString() + " Milisegundos";
            }
        }
 private void RefreshTxtCamposBDEtiqueta()
 {
     try
     {
         if (m_bAtivado)
         {
             m_bAtivado = !m_bAtivado;
             if (m_lvEtiquetas.SelectedItems.Count > 0)
             {
                 m_strTexto                = m_lvEtiquetas.SelectedItems[0].Text;
                 m_lbTextoEdicao.Text      = m_strTexto;
                 m_lbTextoEdicao.BackColor = m_lvEtiquetas.BackColor;
                 m_lbFonte.Text            = m_cls_call_CallBack.strCarregaDados(Int32.Parse(m_lvEtiquetas.SelectedItems[0].Tag.ToString()));
                 if (m_lvCampos.SelectedItems.Count > 0)
                 {
                     m_lvCampos.SelectedItems[0].Selected = false;
                 }
             }
             m_bAtivado = !m_bAtivado;
         }
     }catch (System.Exception eErro) {
         m_cls_ter_tratadorErro.trataErro(ref eErro);
     }
 }