Beispiel #1
0
        private void FunCargaMantenimiento()
        {
            _dts = new ConsultaDatosDAO().FunConsultaDatos(218, int.Parse(ViewState["CodigoCPCE"].ToString()),
                                                           0, 0, "", "", "", Session["Conectar"].ToString());
            GrdvCompromisos.DataSource = _dts;
            GrdvCompromisos.DataBind();

            _dts = new ConsultaDatosDAO().FunConsultaDatos(219, int.Parse(ViewState["CodigoCPCE"].ToString()),
                                                           0, 0, "", "", "", Session["Conectar"].ToString());
            GrdvPagos.DataSource = _dts;
            GrdvPagos.DataBind();
        }
        protected void BtnProcesar_Click(object sender, EventArgs e)
        {
            try
            {
                if (DdlCedente.SelectedValue == "0")
                {
                    new FuncionesDAO().FunShowJSMessage("Seleccione Cedente..!", this);
                    return;
                }

                if (DdlTipoDocumento.SelectedValue != "0")
                {
                    if (string.IsNullOrEmpty(TxtDocumento.Text.Trim()))
                    {
                        new FuncionesDAO().FunShowJSMessage("Ingrese No. de Documento..!", this);
                        return;
                    }
                }

                if (DdlGestores.SelectedValue == "0" && DdlTipoDocumento.SelectedValue == "0")
                {
                    _tipo = 0;
                }
                if (DdlGestores.SelectedValue != "0" && DdlTipoDocumento.SelectedValue == "0")
                {
                    _tipo = 1;
                }
                if (DdlGestores.SelectedValue != "0" && DdlTipoDocumento.SelectedValue == "1")
                {
                    _tipo = 2;
                }
                if (DdlGestores.SelectedValue != "0" && DdlTipoDocumento.SelectedValue == "2")
                {
                    _tipo = 3;
                }
                if (DdlGestores.SelectedValue == "0" && DdlTipoDocumento.SelectedValue == "1")
                {
                    _tipo = 4;
                }
                if (DdlGestores.SelectedValue == "0" && DdlTipoDocumento.SelectedValue == "2")
                {
                    _tipo = 5;
                }

                _dts = new ConsultaDatosDAO().FunConsultaDatos(221, int.Parse(DdlCatalogo.SelectedValue), _tipo,
                                                               int.Parse(DdlGestores.SelectedValue), "", TxtDocumento.Text.Trim(), "", Session["Conectar"].ToString());

                if (_dts.Tables[0].Rows.Count > 0)
                {
                    DivPagos.Visible = true;
                }
                else
                {
                    DivPagos.Visible = false;
                }

                GrdvPagos.DataSource = _dts;
                GrdvPagos.DataBind();
            }
            catch (Exception ex)
            {
                Lblerror.Text = ex.ToString();
            }
        }
Beispiel #3
0
        protected void FunCargarMantenimiento()
        {
            try
            {
                _dts = new ConsultaDatosDAO().FunConsultaDatos(170, 0, 0, 0, "", ViewState["Bitacora"].ToString(), "",
                                                               Session["Conectar"].ToString());

                GrdvSupervisores.DataSource = _dts.Tables[0];
                GrdvSupervisores.DataBind();

                if (_dts.Tables[1].Rows.Count > 0)
                {
                    Pnl3.Visible           = true;
                    GrdvAtrasos.DataSource = _dts.Tables[1];
                    GrdvAtrasos.DataBind();
                }

                if (_dts.Tables[2].Rows.Count > 0)
                {
                    Pnl4.Visible           = true;
                    GrdvFaltasJ.DataSource = _dts.Tables[2];
                    GrdvFaltasJ.DataBind();
                }

                if (_dts.Tables[3].Rows.Count > 0)
                {
                    Pnl5.Visible           = true;
                    GrdvFaltasI.DataSource = _dts.Tables[3];
                    GrdvFaltasI.DataBind();
                }

                if (_dts.Tables[4].Rows.Count > 0)
                {
                    Pnl6.Visible            = true;
                    GrdvPermisos.DataSource = _dts.Tables[4];
                    GrdvPermisos.DataBind();
                }

                if (_dts.Tables[5].Rows.Count > 0)
                {
                    Pnl7.Visible = true;
                    GrdvCambioTurno.DataSource = _dts.Tables[5];
                    GrdvCambioTurno.DataBind();
                }

                if (_dts.Tables[6].Rows.Count > 0)
                {
                    Pnl8.Visible          = true;
                    GrdvVarios.DataSource = _dts.Tables[6];
                    GrdvVarios.DataBind();
                }

                if (_dts.Tables[7].Rows.Count > 0)
                {
                    Pnl9.Visible           = true;
                    GrdvNovedad.DataSource = _dts.Tables[7];
                    GrdvNovedad.DataBind();
                }

                if (_dts.Tables[8].Rows.Count > 0)
                {
                    Pnl10.Visible           = true;
                    GrdvRefuerzo.DataSource = _dts.Tables[8];
                    GrdvRefuerzo.DataBind();
                }

                if (_dts.Tables[9].Rows.Count > 0)
                {
                    Pnl11.Visible          = true;
                    GrdvTerreno.DataSource = _dts.Tables[9];
                    GrdvTerreno.DataBind();
                }

                if (_dts.Tables[10].Rows.Count > 0)
                {
                    Pnl12.Visible           = true;
                    GrdvSistemas.DataSource = _dts.Tables[10];
                    GrdvSistemas.DataBind();
                }

                if (_dts.Tables[11].Rows.Count > 0)
                {
                    Pnl13.Visible        = true;
                    GrdvPagos.DataSource = _dts.Tables[11];
                    GrdvPagos.DataBind();
                }

                if (_dts.Tables[12].Rows.Count > 0)
                {
                    Pnl14.Visible = true;
                    GrdvAdicionales.DataSource = _dts.Tables[12];
                    GrdvAdicionales.DataBind();
                }
            }
            catch (Exception ex)
            {
                Lblerror.Text = ex.ToString();
            }
        }