Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bdTS  = new BDTS();
                bdGEN = new BDGEN();
                BDF   = new BDFamilia();
                F     = mast.F;
                S     = mast.S;
                U     = mast.U;
                L     = mast.L;
                dic   = new Diccionario(L, S);
                try
                {
                    llenarElementos();
                    visibilizarPestaña(pnlReporte, lnkReporte);
                }
                catch
                {
                }
            }
            DataTable dtTS = bdGEN.obtenerTS(S);

            mst = (mast)Master;
        }
Esempio n. 2
0
 public void llenarIds()
 {
     if (!String.IsNullOrEmpty(F))
     {
         pnlMiembroSel.Visible = false;
         pnlFamiliaSel.Visible = true;
         lblFamiliaSel.Text    = "<b>" + dic.familia + ":</b>";
         lnkFamiliaSel.Text    = S + F;
         DataTable dtFaro = new BDFamilia().obtenerDatos(S, F, L);
         if (dtFaro.Rows.Count > 0)
         {
             String faro = dtFaro.Rows[0]["RFaroNumber"].ToString();
             if (!String.IsNullOrEmpty(faro) && !faro.Equals("0"))
             {
                 lblFaroSel.Text    = "&nbsp;<b>" + "Faro" + ":</b>&nbsp;" + faro;
                 lblFaroSel.Visible = true;
             }
         }
     }
     if (!String.IsNullOrEmpty(M))
     {
         DataTable dtMiembro = new BDMiembro().obtenerDatos(S, M, L);;
         lblMiembroSel.Text = "<b>" + dic.miembro + ":</b>";
         String nombreCompleto = dtMiembro.Rows[0]["FirstNames"].ToString() + " " + dtMiembro.Rows[0]["LastNames"].ToString();
         lblNombreMiembroSel.Text = nombreCompleto;
         lnkMiembroSel.Text       = M;
         pnlMiembroSel.Visible    = true;
         F = dtMiembro.Rows[0]["FamilyId"].ToString();
         lblFamiliaSel.Text    = "<b>" + dic.familia + ":</b>";
         lnkFamiliaSel.Text    = S + F;
         pnlFamiliaSel.Visible = true;
     }
 }
 protected void iniciarElementos()
 {
     mst = (mast)Master;
     if (!IsPostBack)
     {
         bdTS  = new BDTS();
         bdGEN = new BDGEN();
         BDF   = new BDFamilia();
         F     = mast.F;
         S     = mast.S;
         U     = mast.U;
         L     = mast.L;
         dic   = new Diccionario(L, S);
         llenarElementos();
         if (Session["AsignoTSGrupo"] != null)
         {
             String asigno = (String)Session["AsignoTSGrupo"];
             if (asigno.Equals("SI"))
             {
                 mst.mostrarMsjNtf(dic.msjSeHaActualizado);
             }
             else
             {
                 mst.mostrarMsjMdl(dic.msjNoSeRealizoExcp + asigno + ".");
             }
             Session["AsignoTSGrupo"] = null;
         }
     }
 }
Esempio n. 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     F = mast.F;
     M = mast.M;
     L = mast.L;
     S = mast.S;
     if (S.Equals("E") || S.Equals("A"))
     {
         gdvAvisos.Visible = false;
         tblAfil.Visible   = false;
     }
     if (!IsPostBack)
     {
         mst = (mast)Master;
         try
         {
             BDF = new BDFamilia();
             dic = new Diccionario(L, S);
             agregaInfoGen();
             agregaPalabras();
             agregaMiembrosAct();
             agregaAvisos();
         }
         catch
         {
         }
     }
 }
Esempio n. 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         bdTS  = new BDTS();
         bdGEN = new BDGEN();
         BDF   = new BDFamilia();
         F     = mast.F;
         S     = mast.S;
         U     = mast.U;
         L     = mast.L;
         vista = mast.vista;
         dic   = new Diccionario(L, S);
         try
         {
             llenarElementos();
             DataTable dt   = BDF.obtenerDatos(S, F, L);
             DataRow   rowF = dt.Rows[0];
             lblVDirec.Text  = rowF["Address"].ToString() + ", " + rowF["Area"].ToString();
             lblVClasif.Text = rowF["Classification"].ToString();
             lblVTS.Text     = rowF["TS"].ToString();
             lblVTelef.Text  = rowF["Phone"].ToString();
             if (vista)
             {
                 cargarConSeguridad();
             }
         }
         catch
         {
         }
     }
     mst = (mast)Master;
 }
Esempio n. 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     mst = (mast)Master;
     if (!IsPostBack)
     {
         try
         {
             bdTS  = new BDTS();
             bdGEN = new BDGEN();
             BDF   = new BDFamilia();
             F     = mast.F;
             S     = mast.S;
             U     = mast.U;
             L     = mast.L;
             vista = mast.vista;
             dic   = new Diccionario(L, S);
             llenarElementos();
             if (vista)
             {
                 cargarConSeguridad();
             }
         }
         catch
         {
         }
     }
 }
Esempio n. 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         bdTS  = new BDTS();
         BDF   = new BDFamilia();
         F     = mast.F;
         S     = mast.S;
         U     = mast.U;
         L     = mast.L;
         vista = mast.vista;
         try
         {
             DataTable dt   = BDF.obtenerDatos(S, F, L);
             DataRow   rowF = dt.Rows[0];
             lblVDirec.Text  = rowF["Address"].ToString() + ", " + rowF["Area"].ToString();
             lblVClasif.Text = rowF["Classification"].ToString();
             lblVTelef.Text  = rowF["Phone"].ToString();
             lblVTS.Text     = rowF["TS"].ToString();
             dic             = new Diccionario(L, S);
             cargarPgnVisitas();
             cargarConSeguridad();
         }
         catch
         {
         }
     }
     mst = (mast)Master;
     mst.contentCallEvent += new EventHandler(eliminarVisita);
 }
Esempio n. 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     mst = (mast)Master;
     if (!IsPostBack)
     {
         bdTS  = new BDTS();
         bdGEN = new BDGEN();
         BDF   = new BDFamilia();
         F     = mast.F;
         S     = mast.S;
         U     = mast.U;
         L     = mast.L;
         vista = mast.vista;
         dic   = new Diccionario(L, S);
         año   = (DateTime.Now.Year + 1) + "";
         try
         {
             llenarGdvMiembros();
             DataTable dt   = BDF.obtenerDatos(S, F, L);
             DataRow   rowF = dt.Rows[0];
             lblDirec.Text   = dic.direccion + ":";
             lblTelef.Text   = dic.telefono + ":";
             lblTS.Text      = dic.trabajadorS + ":";
             lblClasif.Text  = dic.clasificacion + ":";
             lblVDirec.Text  = rowF["Address"].ToString() + ", " + rowF["Area"].ToString();
             lblVClasif.Text = rowF["Classification"].ToString();
             lblVTS.Text     = rowF["TS"].ToString();
             lblVTelef.Text  = rowF["Phone"].ToString();
             btnGuardar.Text = dic.guardar;
             if (vista)
             {
                 cargarConSeguridad();
             }
             if (gdvMiembros.Rows.Count == 0)
             {
                 if (L.Equals("es"))
                 {
                     mst.mostrarMsjStc("Esta familia no tiene miembros aptos para registrar NADFAS.");
                 }
                 else
                 {
                     mst.mostrarMsjStc("This family has no members eligible to register NADFAS.");
                 }
             }
             else
             {
             }
         }
         catch
         {
         }
     }
 }
Esempio n. 9
0
        protected void lblBuscar_Click(object sender, EventArgs e)
        {
            String memberId = txbMemberId.Text;
            String familyId = txbFamilyId.Text;
            String faroId   = txbFaroId.Text;

            if (!String.IsNullOrEmpty(memberId) && String.IsNullOrEmpty(familyId) && String.IsNullOrEmpty(faroId))
            {
                DataTable dtMiembro = new BDMiembro().obtenerDatos(S, memberId, L);
                if (dtMiembro.Rows.Count > 0)
                {
                    Session["M"] = memberId;
                    Response.Redirect("~/MISC/PerfilMiembro.aspx");
                }
                else
                {
                    mst.mostrarMsjAdvNtf(dic.msjNoEncontroMiembro);
                }
            }
            else if (String.IsNullOrEmpty(memberId) && !String.IsNullOrEmpty(familyId) && String.IsNullOrEmpty(faroId))
            {
                DataTable dtFamilia = new BDFamilia().obtenerDatos(S, familyId, L);
                if (dtFamilia.Rows.Count > 0)
                {
                    Session["F"] = familyId;
                    Response.Redirect("~/MISC/PerfilFamilia.aspx");
                }
                else
                {
                    mst.mostrarMsjAdvNtf(dic.msjNoEncontroFamilia);
                }
            }
            else if (String.IsNullOrEmpty(memberId) && String.IsNullOrEmpty(familyId) && !String.IsNullOrEmpty(faroId))
            {
                String familyIdFaro = "";
                familyIdFaro = (new BDFamilia().obtenerIdAPartirDeFaro(S, faroId)) + "";
                DataTable dtFamilia = new BDFamilia().obtenerDatos(S, familyIdFaro, L);
                if (dtFamilia.Rows.Count > 0)
                {
                    Session["F"] = familyIdFaro;
                    Response.Redirect("~/MISC/PerfilFamilia.aspx");
                }
                else
                {
                    mst.mostrarMsjAdvNtf(dic.msjNoEncontroFamilia);
                }
            }
            else
            {
                mst.mostrarMsjAdvNtf(dic.msjDebeingresarUno);
            }
        }
Esempio n. 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         bdTS  = new BDTS();
         bdGEN = new BDGEN();
         BDF   = new BDFamilia();
         F     = mast.F;
         S     = mast.S;
         U     = mast.U;
         L     = mast.L;
         vista = mast.vista;
         dic   = new Diccionario(L, S);
         mst   = (mast)Master;
         año   = (DateTime.Now.Year) + "";
         try
         {
             llenarGdvMiembros();
             llenarElementos();
             edadMiembro = 20;
             DataTable dt   = BDF.obtenerDatos(S, F, L);
             DataRow   rowF = dt.Rows[0];
             lblVDirec.Text  = rowF["Address"].ToString() + " " + rowF["Area"].ToString();
             lblVClasif.Text = rowF["Classification"].ToString();
             lblVTS.Text     = rowF["TS"].ToString();
             lblVTelef.Text  = rowF["Phone"].ToString();
             if (gdvMiembros.Rows.Count == 0)
             {
                 if (L.Equals("es"))
                 {
                     mst.mostrarMsjStc("Esta familia no tiene miembros aptos para registrar Años Escolares.");
                 }
                 else
                 {
                     mst.mostrarMsjStc("This family has no members eligible to register School Years.");
                 }
             }
             else
             {
                 if (vista)
                 {
                     cargarConSeguridad();
                 }
             }
         }
         catch
         {
         }
     }
     mst = (mast)Master;
     mst.contentCallEvent += new EventHandler(eliminarAñoEscolar);
 }
Esempio n. 11
0
        private void agregaAvisos()
        {
            DataTable dtAvisos = new BDFamilia().obtenerAvisos(S, F, L, false);

            gdvAvisos.Columns[0].HeaderText = dic.avisos;
            if (dtAvisos.Rows.Count > 0)
            {
                gdvAvisos.DataSource = dtAvisos;
                gdvAvisos.DataBind();
            }
            else
            {
                DataTable dtAvisosAux = new DataTable();
                dtAvisosAux.Columns.Add("Aviso");
                dtAvisosAux.Rows.Add(dic.noTiene);
                gdvAvisos.DataSource = dtAvisosAux;
                gdvAvisos.DataBind();
            }
        }
Esempio n. 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     mst       = (mast)Master;
     año       = DateTime.Now.Year;
     cantMeses = 4;
     if (!IsPostBack)
     {
         soloUltimas = 0;
         asignaColores();
         U    = mast.U;
         S    = mast.S;
         L    = mast.L;
         F    = mast.F;
         bdTS = new BDTS();
         bdF  = new BDFamilia();
         dic  = new Diccionario(L, S);
         try
         {
             DataTable dt   = bdF.obtenerDatos(S, F, L);
             DataRow   rowF = dt.Rows[0];
             lblVDirec.Text  = rowF["Address"].ToString() + ", " + rowF["Area"].ToString();
             lblVClasif.Text = rowF["Classification"].ToString();
             lblVTS.Text     = rowF["TS"].ToString();
             lblVTelef.Text  = rowF["Phone"].ToString();
             llenarNombres();
             pnlContenedor.Visible = false;
             try
             {
                 buscar();
                 visibilizarPestaña(pnlInfoGeneral, lnkInfoGeneral);
             }
             catch (Exception ex)
             {
                 mst.mostrarMsjStc(dic.msjNoSeRealizoExcp + ex.Message.ToString() + ".");
             }
         }
         catch
         {
         }
     }
 }
Esempio n. 13
0
        protected void btnGuardar_Click(object sender, EventArgs e)
        {
            String memberId = txbMiembro.Text;
            String familyId = txbFamilia.Text;

            if (!String.IsNullOrEmpty(memberId) && String.IsNullOrEmpty(familyId))
            {
                DataTable dtMiembro = new BDMiembro().obtenerDatos(S, memberId, L);
                if (dtMiembro.Rows.Count > 0)
                {
                    guardar(memberId);
                }
                else
                {
                    mst.mostrarMsjAdvNtf(dic.msjNoEncontroMiembro);
                }
            }
            else if (String.IsNullOrEmpty(memberId) && !String.IsNullOrEmpty(familyId))
            {
                DataTable dtFamilia = new BDFamilia().obtenerDatos(S, familyId, L);
                if (dtFamilia.Rows.Count > 0)
                {
                    gdvMiembros.Columns[0].Visible = true;
                    gdvMiembros.DataSource         = new BDFamilia().obtenerActivos(S, familyId, L);
                    gdvMiembros.DataBind();
                    gdvMiembros.Columns[0].Visible = false;
                    pnlActualizar.Visible          = false;
                    mst.mostrarModalYContenido(pnlMiembros);
                }
                else
                {
                    mst.mostrarMsjAdvNtf(dic.msjNoEncontroFamilia);
                }
            }
            else
            {
                mst.mostrarMsjAdvNtf(dic.msjDebeingresarUno);
            }
        }
Esempio n. 14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         bdTS  = new BDTS();
         bdGEN = new BDGEN();
         BDF   = new BDFamilia();
         F     = mast.F;
         S     = mast.S;
         U     = mast.U;
         L     = mast.L;
         dic   = new Diccionario(L, S);
         try
         {
             llenarElementos();
         }
         catch
         {
         }
     }
     mst = (mast)Master;
 }
Esempio n. 15
0
        private void llenarAvisos()
        {
            DataTable dtAvisos = new BDFamilia().obtenerAvisos(S, F, L, true);

            gdvAvisos.Columns[0].HeaderText = dic.avisos;
            if (dtAvisos.Rows.Count > 0)
            {
                //gdvAvisos.Columns[1].Visible = false;
                gdvAvisos.DataSource = dtAvisos;
                gdvAvisos.DataBind();
            }
            else
            {
                //gdvAvisos.Columns[1].HeaderText = dic.avisos;
                //gdvAvisos.Columns[0].Visible = false;
                DataTable dtAvisosAux = new DataTable();
                dtAvisosAux.Columns.Add("Aviso");
                dtAvisosAux.Rows.Add(dic.noTiene);
                gdvAvisos.DataSource = dtAvisosAux;
                gdvAvisos.DataBind();
            }
        }
Esempio n. 16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     mst = (mast)Master;
     mst.contentCallEvent += new EventHandler(eliminarAnalisis);
     if (!IsPostBack)
     {
         try
         {
             bdTS         = new BDTS();
             bdGEN        = new BDGEN();
             BDF          = new BDFamilia();
             F            = mast.F;
             S            = mast.S;
             U            = mast.U;
             L            = mast.L;
             dic          = new Diccionario(L, S);
             postAnalisis = false;
             llenarElementos();
             if (!String.IsNullOrEmpty(F))
             {
                 try
                 {
                     familia = F;
                     llenarPnlRegistroAnalisis();
                     pnlAsignarClasif.Visible = true;
                     pnlFamilias.Visible      = false;
                 }
                 catch (Exception ex)
                 {
                     mst.mostrarMsjMdl(dic.msjNoSeRealizoExcp + ex.ToString() + ".");
                 }
             }
         }
         catch
         {
         }
     }
 }
Esempio n. 17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         asignaColores();
         bdTS  = new BDTS();
         bdGEN = new BDGEN();
         BDF   = new BDFamilia();
         F     = mast.F;
         S     = mast.S;
         U     = mast.U;
         L     = mast.L;
         vista = mast.vista;
         dic   = new Diccionario(L, S);
         area  = "TS";
         try
         {
             llenarElementos();
             visibilizarPestaña(pnlOpciones, lnkOpciones);
             DataTable dt   = BDF.obtenerDatos(S, F, L);
             DataRow   rowF = dt.Rows[0];
             lblVDirec.Text  = rowF["Address"].ToString() + ", " + rowF["Area"].ToString();
             lblVClasif.Text = rowF["Classification"].ToString();
             lblVTS.Text     = rowF["TS"].ToString();
             lblVTelef.Text  = rowF["Phone"].ToString();
             if (vista)
             {
                 cargarConSeguridad();
             }
         }
         catch
         {
         }
     }
     mst = (mast)Master;
     mst.contentCallEvent += new EventHandler(eliminarAviso);
 }
Esempio n. 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            M     = mast.M;
            L     = mast.L;
            S     = mast.S;
            F     = mast.F;
            U     = mast.U;
            vista = mast.vista;
            mst   = (mast)Master;
            mst.contentCallEvent += new EventHandler(modificar);
            dic = new Diccionario(L, S);

            if (!IsPostBack)
            {
                BDF  = new BDFamilia();
                BDM  = new BDMiembro();
                bdTS = new BDTS();
                dic  = new Diccionario(L, S);
                try
                {
                    valoresiniciales();
                    DataTable dt   = BDF.obtenerDatos(S, F, L);
                    DataRow   rowF = dt.Rows[0];
                    lblVDirec.Text  = rowF["Address"].ToString() + ", " + rowF["Area"].ToString();
                    lblVClasif.Text = rowF["Classification"].ToString();
                    lblVTS.Text     = rowF["TS"].ToString();
                    lblVTelef.Text  = rowF["Phone"].ToString();
                    if (vista)
                    {
                        cargarConSeguridad();
                    }
                }
                catch
                {
                }
            }
        }
Esempio n. 19
0
        public void seguridad()
        {
            String paginaActual = Request.Url.Segments[Request.Url.Segments.Length - 1];

            if (s.paginaEsPermitida(U, S, paginaActual))
            {
                int sSel = s.retornaSeguridadSeleccion(paginaActual);

                if ((sSel == (int)Selec.FamAfil) || (sSel == (int)Selec.FamAfilGradDesa) || (sSel == (int)Selec.FamRegi))
                {
                    if (String.IsNullOrEmpty(F))
                    {
                        mostrarFormularioSeleccionarFamilia();
                    }
                    else
                    {
                        DataTable dtFamilia = new BDFamilia().obtenerDatos(S, F);
                        if (dtFamilia.Rows.Count > 0)
                        {
                            String estadoAfil = dtFamilia.Rows[0]["AffiliationStatus"].ToString();
                            if (!estadoAfil.Equals("AFIL"))
                            {
                                vista = true;
                            }
                            pnlRepetir.Visible = true;
                        }
                        else
                        {
                            mostrarFormularioSeleccionarFamilia();
                        }
                    }
                }
                else
                if ((sSel == (int)Selec.Afil) || (sSel == (int)Selec.AfilApadGrad) || (sSel == (int)Selec.FamRegi) || (sSel == (int)Selec.MiemFamRegi))
                {
                    if (String.IsNullOrEmpty(M))
                    {
                        mostrarFormularioSeleccionarMiembro();
                    }
                    else
                    {
                        pnlRepetir.Visible = true;
                    }
                }
                else
                if ((sSel == (int)Selec.Padr))
                {
                    if (String.IsNullOrEmpty(P))
                    {
                        mostrarFormularioSeleccionarPadrino();
                    }
                    else
                    {
                        pnlRepetir.Visible = true;
                    }
                }
            }
            else
            {
                redir("~/MISC/Buscar.aspx");
            }
        }
Esempio n. 20
0
        //////////////////////////////////////////////////////////////-EVENTOS-////////////////////////////////////////////////////////
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                M   = mast.M;
                L   = mast.L;
                S   = mast.S;
                P   = mast.P;
                U   = mast.U;
                F   = mast.F;
                dic = new Diccionario(L, S);
                mst = (mast)Master;
                APD = new BDAPAD();
                if (!IsPostBack)
                {
                    mst = (mast)Master;



                    BDM = new BDMiembro();
                    BDF = new BDFamilia();
                    APD = new BDAPAD();
                    dic = new Diccionario(L, S);
                    DataTable dt = APD.InfoGen(S, M, L);
                    try
                    {
                        string A = dt.Rows[0][1].ToString();
                        if (A == "Afiliado" || A == "Affiliated")
                        {
                            ruta     = @"\\SVRAPP\FamilyFotos\Apadrinados";
                            desicion = 0;

                            agregaAvisos();
                            Padrinos(S, M);

                            traducir();
                            llenarcombos(L, S);
                            registrocarta();
                            registroregalo();
                            InformacionPersonal();
                            avisoretormar();
                            Foto(S, M, desicion, ruta);
                            VerificarPadrinos();
                        }
                        else if (string.IsNullOrEmpty(A))
                        {
                        }
                        else
                        {
                            ruta     = @"\\SVRAPP\FamilyFotos\ExApadrinados";
                            desicion = 1;
                            GraduadoDesa();
                            agregaAvisos();
                            VerificarPadrinos();
                            traducir();
                            InformacionPersonal();
                            Foto(S, M, desicion, ruta);
                            btnRetomar.Visible = false;
                        }
                    }
                    catch (Exception ex)
                    {
                    }
                }
                if (IsPostBack)
                {
                    BDM = new BDMiembro();
                    APD = new BDAPAD();
                }
                mst = (mast)Master;
                // mst.contentCallEvent += EventHandler();
            }

            catch (Exception ez)
            {
                Session["M"] = null;
                Session["F"] = null;
            }
        }