예제 #1
0
        private void Listar_Supervisiones()
        {
            brSupervisiones br = new brSupervisiones();
            string          SinAt = "", Exten = "", Falt = "", Canc = "", FichGe = "";
            string          BeginDate, EndDate;

            BeginDate = txtFechaIni.Text;
            EndDate   = txtFechaFin.Text;

            if (chkSinAtencion.Checked)
            {
                SinAt = "1";
            }
            else
            {
                SinAt = "0";
            }

            if (chkExtendido.Checked)
            {
                Exten = "1";
            }
            else
            {
                Exten = "0";
            }

            if (chkFalta.Checked)
            {
                Falt = "1";
            }
            else
            {
                Falt = "0";
            }

            if (chkCancelado.Checked)
            {
                Canc = "1";
            }
            else
            {
                Canc = "0";
            }

            if (chkFichagenerada.Checked)
            {
                FichGe = "1";
            }
            else
            {
                FichGe = "0";
            }

            //      List<beSupervisiones> lbeSupervisiones = br.ListarSupervisiones(SinAt, Exten, Falt, Canc, FichGe);
            gvSupervisiones.DataBind();
        }
예제 #2
0
        private void Listar_Supervisiones()
        {
            brSupervisiones br = new brSupervisiones();
            string          Pend = "", Conc = "", Aten = "", Canc = "", Env = "", Trab = "", Obs = "";
            string          BeginDate, EndDate, Mant = "";

            BeginDate = txtFechaDesde.Text;
            EndDate   = txtFechaHasta.Text;

            if (chkPendiente.Checked)
            {
                Pend = "1";
            }
            else
            {
                Pend = "0";
            }

            if (chkConcluida.Checked)
            {
                Conc = "1";
            }
            else
            {
                Conc = "0";
            }

            if (chkAtencion.Checked)
            {
                Aten = "1";
            }
            else
            {
                Aten = "0";
            }

            if (chkCancelada.Checked)
            {
                Canc = "1";
            }
            else
            {
                Canc = "0";
            }

            if (chkenviadas.Checked)
            {
                Env = "1";
            }
            else
            {
                Env = "0";
            }

            if (chkTrabPend.Checked)
            {
                Trab = "1";
            }
            else
            {
                Trab = "0";
            }

            if (chkObservaciones.Checked)
            {
                Obs = "1";
            }
            else
            {
                Obs = "0";
            }

            foreach (GridViewRow row in gvTipoMantenimiento.Rows)
            {
                CheckBox check = row.FindControl("chkSel") as CheckBox;

                beTipoMant P        = new beTipoMant();
                string     strError = string.Empty;

                if (check.Checked)
                {
                    Mant = Mant + row.Cells[0].Text + ",";
                }
            }
            int lmant = Mant.Length;

            if (lmant > 0)
            {
                Mant = Mant.Substring(0, lmant - 1);
            }

            List <beSupervision> lbeSupervisiones = br.ListarSupervisiones(txtCsid.Text.ToString(), txtOperador.Text.ToString(), txtProveedor.Text.ToString(), txtTecnico.Text.ToString(), Pend, Conc, Aten, Canc, BeginDate, EndDate, Mant, Obs, Trab, Env);

            gvSupervisiones.DataSource = lbeSupervisiones;
            gvSupervisiones.DataBind();
        }