コード例 #1
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         Fuentes fue = new Fuentes()
         {
             Numero_Fuente      = int.Parse(txtNumero.Text),
             Archivo_Fuente     = txtArchivo.Text,
             Sistema_Fuente     = txtSistema.Text,
             Contenido          = txtContenido.Text,
             Cantidad_Registros = int.Parse(txtCantidad.Text),
             Periodicidad       = listas.IdPeriodicidadPorNombre(ddlPeriodicidad.SelectedValue.ToString()),
             Tipo_Extractor     = listas.IdExtractorPorNombre(ddlExtractor.SelectedValue.ToString()),
             Nombre             = txtSistema.Text + "_" + txtArchivo.Text
         };
         if (fue.Update())
         {
             LimpiarControles();
             lblMensaje.Text = "Fuente N°: " + txtNumero.Text + ", actualizada correctamente.";
         }
         else
         {
             lblMensaje.Text = "No se puede actualizar la fuente.";
         }
     }
     catch (Exception ex)
     {
         lblMensaje.Text = "Error al actualizar fuente.";
     }
 }
コード例 #2
0
        protected void txtNumero_TextChanged(object sender, EventArgs e)
        {
            Fuentes fue = new Fuentes()
            {
                Numero_Fuente = int.Parse(txtNumero.Text)
            };

            if (IsPostBack)
            {
                if (fue.Read())
                {
                    LimpiarControles();
                    txtArchivo.Text               = fue.Archivo_Fuente;
                    txtSistema.Text               = fue.Sistema_Fuente;
                    txtContenido.Text             = fue.Contenido;
                    txtCantidad.Text              = fue.Cantidad_Registros.ToString();
                    ddlPeriodicidad.SelectedValue = listas.NombrePeriodicidadPorId(fue.Periodicidad);
                    ddlExtractor.SelectedValue    = listas.NombreExtractorPorId(fue.Tipo_Extractor);
                    CargarRelaciones();
                }
                else
                {
                    LimpiarControles();
                    lblNumeroFuente.Text = "Fuente no encontrada.";
                    txtArchivo.Focus();
                }
            }
        }
コード例 #3
0
        protected void btnSeleccionar_onclick(object sender, System.EventArgs e)
        {
            if (usuario.Tipo_Usuario == 3)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(),
                                                    "err_msg",
                                                    "alert('Su perfil no permite editar fuentes.');",
                                                    true);
            }
            else
            {
                Button      btn    = (Button)sender;
                GridViewRow row    = (GridViewRow)btn.NamingContainer;
                string      codigo = row.Cells[1].Text;

                Fuentes fuente = new Fuentes()
                {
                    Numero_Fuente = int.Parse(codigo),
                };
                fuente.Read();
                descripcionFuente = fuente;

                Relacion x = new Relacion()
                {
                    Id_Tipo_Relacion = int.Parse(codigo),
                };
                x.Read();
                relacion = x;

                Response.BufferOutput = true;
                Response.Redirect("Mant_Fuentes.aspx");
            }
        }
コード例 #4
0
ファイル: LogIn.cs プロジェクト: seansa/Biometrico
        public LogIn()
        {
            InitializeComponent();

            this.PuedeIngresarAlSistema = false;
            this.imgLogo.Image          = PresentacionBase.Imagenes.BotonLogin;
            lblTitulo.Font   = Fuentes.NuevaFuente(RecursosCompartidos.Helvetica_Neue_UltraLight, (long)27.0);
            lblTitulo2.Font  = Fuentes.NuevaFuente(RecursosCompartidos.Helvetica_Neue_UltraLight, (long)27.0);
            lblUsuario.Font  = Fuentes.NuevaFuente(RecursosCompartidos.Helvetica_Neue_Medium, (long)10.0);
            lblPassword.Font = Fuentes.NuevaFuente(RecursosCompartidos.Helvetica_Neue_Medium, (long)10.0);
        }
コード例 #5
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         int     idFuente = int.Parse(txtNumero.Text);
         Fuentes fue      = new Fuentes()
         {
             Numero_Fuente = idFuente
         };
         if (fue.Delete())
         {
             LimpiarControles();
             lblMensaje.Text = "Fuente N°: " + idFuente + ", eliminada correctamente.";
         }
         else
         {
             lblMensaje.Text = "No se puede eliminar la fuente.";
         }
     }
     catch (Exception ex)
     {
         lblMensaje.Text = "Error al eliminar fuente.";
     }
 }
コード例 #6
0
 public _00010_Horarios(string Titulo) : this()
 {
     this.lblTitle.Text = Titulo;
     lblTitulo.Font     = Fuentes.NuevaFuente(RecursosCompartidos.Helvetica_Neue_UltraLight, (long)20);
 }