protected void PDF(object sender, EventArgs e)
        {
            DBConnect conector = new DBConnect();
            DataTable listado  = conector.SelectPlanilla(TextBox1.Value);

            if (listado.Rows.Count > 0)
            {
                Response.Redirect("../Reportes/planillapdf.aspx?nombre=" + TextBox1.Value);
            }
            else
            {
                MiMensaje.verCalendario(this, "mensaje", "Error. No se ha completado la informacion para " + TextBox1.Value + "!!");
                Label1.Text = "Error. No se ha completado la informacion para " + TextBox1.Value + "!!";
            }
        }
Exemple #2
0
        protected void PDF(object sender, EventArgs e)
        {
            GridViewRow rowselecc = GridView1.SelectedRow;
            string      estatus   = rowselecc.Cells[6].Text;

            if (estatus == "Pendiente")
            {
                MisReportes.verSolicitud(this, "Hidden1", rowselecc.Cells[1].Text);
            }
            if (estatus == "Reparado/Culminado")
            {
                MisReportes.verRespuesta(this, "Hidden1", rowselecc.Cells[1].Text);
            }
            if (estatus == "En Revision")
            {
                DBConnect conexion      = new DBConnect();
                DataTable datos         = conexion.EnRevision(rowselecc.Cells[1].Text);
                string    falla         = datos.Rows[0]["falla"].ToString();
                string    observaciones = datos.Rows[0]["observaciones"].ToString();
                MiMensaje.verEnRevision(this, "Hidden1", falla, observaciones);
                //MisReportes.verRespuesta(this, "Hidden1", rowselecc.Cells[1].Text);
            }
        }
Exemple #3
0
        protected void Guardar(object sender, EventArgs e)
        {
            int sa  = 0;
            int ss  = 0;
            int so  = 0;
            int app = 0;
            int win = 0;
            int off = 0;
            int cpu = 0;
            int imp = 0;
            int mon = 0;
            int tec = 0;
            int mou = 0;
            int reg = 0;
            int ci  = 0;
            int cr  = 0;
            int otr = 0;
            int swi = 0;

            if (rbsa.Checked)
            {
                sa = 1;
            }
            if (rbss.Checked)
            {
                ss = 1;
            }
            if (rbso.Checked)
            {
                so = 1;
            }
            if (rbapp.Checked)
            {
                app = 1;
            }
            if (rboff.Checked)
            {
                off = 1;
            }
            if (rbotr.Checked)
            {
                otr = 1;
            }
            if (rbcpu.Checked)
            {
                cpu = 1;
            }
            if (rbimp.Checked)
            {
                imp = 1;
            }
            if (rbmon.Checked)
            {
                mon = 1;
            }
            if (rbtec.Checked)
            {
                tec = 1;
            }
            if (rbmou.Checked)
            {
                mou = 1;
            }
            if (rbreg.Checked)
            {
                reg = 1;
            }
            if (rbcr.Checked)
            {
                cr = 1;
            }
            if (rbci.Checked)
            {
                ci = 1;
            }
            if (rbswit.Checked)
            {
                swi = 1;
            }
            int       Vdepartamento = Convert.ToInt16(departamento.SelectedValue);
            string    Vsolicitante  = solicitante.Text;
            string    Vfallasoft    = fallasoft.Text;
            string    Vfallahard    = fallahard.Text;
            DBConnect conector      = new DBConnect();
            DataTable datos         = conector.Selecthtipo(nequipo.SelectedItem.Text, htipo.Text);

            if (datos.Rows.Count > 0)
            {
                string vid   = datos.Rows[0]["id"].ToString();
                int    iddoc = conector.IDocumento(Vdepartamento, Vsolicitante, Vfallasoft, cpu, imp, mon, tec, mou, reg, cr, ci, sa, ss, so, app, win, off, otr, Vfallahard, vid, nequipo.SelectedItem.Text, htipo.SelectedValue, swi);
                Response.Redirect("insert.aspx?codigo=" + iddoc + "&serial=" + iddoc + "&hmenu=" + vhmenu.Value);
            }
            else
            {
                MiMensaje.verCalendario(this, "mensaje", "Error. No existe en la Base de Datos un equipo con el nombre " + nequipo.SelectedItem.Text + "!!");
                Label1.Text          = "Error. No existe en la Base de Datos un equipo con el nombre " + nequipo.SelectedItem.Text + "!!";
                ImageButton1.Enabled = false;
            }
        }