Beispiel #1
0
    protected void btnImprimir_Click(object sender, EventArgs e)
    {
        int _cod_ficha_be = Convert.ToInt32(txbNumBE.Text);
        int qtdEtiquetas  = Convert.ToInt32(ddlQtdEtiquetas.SelectedValue);
        //Computador pc = new Computador();
        //pc = ComputadorDAO.getInfoComputador(Dns.GetHostName());
        string nome_impressora_etiqueta = ddlImpressoraEtiqueta.SelectedValue;

        if (nome_impressora_etiqueta == "TSC_GUICHE_PS")
        {
            nome_impressora_etiqueta = "TSC_GUICHE_PS"; // impressora termica
            //nome_impressora_etiqueta = "TSC"; // impressora para teste na informática cac999
            ImpressaoFicha.imprimirEtiqueta(_cod_ficha_be, nome_impressora_etiqueta, qtdEtiquetas);
        }
        else if (nome_impressora_etiqueta == "TSC_GRIPARIO")
        {
            nome_impressora_etiqueta = "TSC_GRIPARIO"; // impressora termica
            ImpressaoFicha.imprimirEtiqueta(_cod_ficha_be, nome_impressora_etiqueta, qtdEtiquetas);
        }

        //string nome_impressora = pc.nome_impressora; // impressora termica
        //string nome_impressora = "Lexmark MX710";
        //if (nome_impressora_etiqueta != "")
        //{
        //    ImpressaoFicha.imprimirEtiqueta(_cod_ficha_be, nome_impressora_etiqueta, qtdEtiquetas);
        //}
    }
Beispiel #2
0
    protected void btnGravar_Click(object sender, EventArgs e)
    {
        _nome_impressora = ddlImpressora.SelectedValue;
        _be = Convert.ToInt32(lbBE.Text);

        ImpressaoFicha.imprimirFicha(_be, _nome_impressora);

        Page.Response.Redirect(Page.Request.Url.ToString(), true);
    }
Beispiel #3
0
    protected void btnImprimir_Click(object sender, EventArgs e)
    {
        int        _cod_ficha_be = Convert.ToInt32(txbNumBE.Text);
        Computador pc            = new Computador();

        pc = ComputadorDAO.getInfoComputador(Dns.GetHostName());
        int qtd = 4;

        string nome_impressora = pc.nome_impressora; // impressora termica

        //string nome_impressora = "Lexmark MX710";
        ImpressaoFicha.imprimirEtiqueta(_cod_ficha_be, nome_impressora, qtd);
    }
Beispiel #4
0
    public void ImprimirEtiqueta(int cod_ficha, int qtdEtiquetas)
    {
        int _cod_ficha_be = Convert.ToInt32(cod_ficha);

        //Computador pc = new Computador();
        //string _hostname = "HSPMINS17";
        //pc = ComputadorDAO.getInfoComputador(_hostname);

        if (nome_impressora == "PS - Guichê")
        {
            string nome_impressora_etiqueta = "TSC_GUICHE_PS"; // impressora termica
            ImpressaoFicha.imprimirEtiqueta(_cod_ficha_be, nome_impressora_etiqueta, qtdEtiquetas);
        }
        if (nome_impressora == "Centro Respiratório")
        {
            string nome_impressora_etiqueta = "TSC_GRIPARIO"; // impressora termica
            ImpressaoFicha.imprimirEtiqueta(_cod_ficha_be, nome_impressora_etiqueta, qtdEtiquetas);
        }
    }
Beispiel #5
0
    protected void btnGravar_Click(object sender, EventArgs e)
    {
        nome_impressora = ddlImpressora.SelectedValue;

        vias = Convert.ToInt32(ddlVias.SelectedValue);

        string mensagem = "";
        int    _pront   = 0;

        if (txbProntuario.Text != "")
        {
            _pront = Convert.ToInt32(txbProntuario.Text);
        }

        string _inform_complement = "";

        for (int i = 0; i < chkFormaChegada.Items.Count; i++)
        {
            if (chkFormaChegada.Items[i].Selected == true)                  // getting selected value from CheckBox List
            {
                _inform_complement += chkFormaChegada.Items[i].Text + ", "; // add selected Item text to the String .
            }
        }
        if (_inform_complement != "")
        {
            _inform_complement = _inform_complement.Substring(0, _inform_complement.Length - 2); // Remove Last "," from the string .
        }

        Ficha be = new Ficha();

        be.dt_rh_be      = Convert.ToDateTime(txbDtFicha.Text);
        be.prontuario    = _pront;
        be.rf            = txbRF.Text;
        be.documento     = txbDocumento.Text;
        be.cns           = txbCNS.Text;
        be.tipo_paciente = rbTipoPaciente.SelectedValue;
        be.nome_paciente = txbNomePaciente.Text;

        if (txbNascimento.Text == "")
        {
            DateTime seData = new DateTime(1800, 1, 1);
            be.dt_nascimento = seData;
        }
        else
        {
            be.dt_nascimento = Convert.ToDateTime(txbNascimento.Text);
        }

        be.idade                   = txbIdade.Text;
        be.sexo                    = ddlSexo.SelectedValue;
        be.raca                    = ddlRaca.SelectedValue;
        be.endereco_rua            = txbEndereco.Text;
        be.numero_casa             = txbNumero.Text;
        be.complemento             = txbComplemento.Text;
        be.bairro                  = txbBairro.Text;
        be.municipio               = txbMunicipio.Text;
        be.uf                      = txbUF.Text;
        be.cep                     = txbCEP.Text;
        be.nome_pai_mae            = txbPais.Text;
        be.responsavel             = txbResponsavel.Text;
        be.telefone                = txbTelefone.Text;
        be.telefone1               = txbTelefone1.Text;
        be.telefone2               = txbTelefone2.Text;
        be.email                   = txbEmail.Text;
        be.procedencia             = ddlProcedencia.SelectedValue;
        be.informacao_complementar = _inform_complement;
        be.queixa                  = txbQueixa.Text;
        be.setor                   = ddlSetor.SelectedValue;
        be.usuario                 = System.Web.HttpContext.Current.User.Identity.Name;
        be.info_resgate            = txbInfoResgate.Text;

        int _cod_ficha_be = FichaDAO.GravaFicha(be.dt_rh_be
                                                , be.prontuario
                                                , be.documento
                                                , be.cns
                                                , be.tipo_paciente
                                                , be.nome_paciente
                                                , be.dt_nascimento
                                                , be.idade
                                                , be.sexo
                                                , be.raca
                                                , be.endereco_rua
                                                , be.numero_casa
                                                , be.complemento
                                                , be.bairro
                                                , be.municipio
                                                , be.uf
                                                , be.cep
                                                , be.nome_pai_mae
                                                , be.responsavel
                                                , be.telefone
                                                , be.telefone1
                                                , be.telefone2
                                                , be.email
                                                , be.procedencia
                                                , be.informacao_complementar
                                                , be.queixa
                                                , be.setor
                                                , be.usuario
                                                , be.info_resgate
                                                , be.rf
                                                );

        mensagem = "Ficha: " + Convert.ToString(_cod_ficha_be);

        while (vias > 0)
        {
            ImpressaoFicha.imprimirFicha(_cod_ficha_be, nome_impressora);
            vias--;
        }

        Response.Redirect("~/Administrativo/FichaRetroativa.aspx");
    }