Exemple #1
0
        private void add_tipoInfraccion()
        {
            string add = new TipoInfraccionBC().add_tipoInfraccion(this.txt_codigo.Text, this.txt_nombre.Text);

            FuncionGlobal.alerta("INFRACCION INGRESADO CON EXITO", this.Page);
            limpiar();
            return;
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <TipoInfraccion> ltipoInfraccion = new TipoInfraccionBC().getallTipoInfraccion();

                this.gr_dato.DataSource = ltipoInfraccion;
                this.gr_dato.DataBind();
            }
        }
Exemple #3
0
        public void Button1_Click(object sender, EventArgs e)
        {
            if (valida_ingreso())

            {
                add_tipoInfraccion();

                List <TipoInfraccion> ltipoInfraccion = new TipoInfraccionBC().getallTipoInfraccion();

                this.gr_dato.DataSource = ltipoInfraccion;
                this.gr_dato.DataBind();

                limpiar();
            }
        }
Exemple #4
0
        protected void gr_dato_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                TipoInfraccion mtipoinfraccion = new TipoInfraccion();
                mtipoinfraccion.Codigo      = "0";
                mtipoinfraccion.Descripcion = "Seleccionar";

                List <TipoInfraccion> ltipoinfraccion = new TipoInfraccionBC().getallTipoInfraccion();
                ltipoinfraccion.Add(mtipoinfraccion);

                DropDownList dl = (DropDownList)e.Row.FindControl("dl_tipo_infraccion");

                dl.DataSource     = ltipoinfraccion;
                dl.DataValueField = "codigo";
                dl.DataTextField  = "descripcion";
                dl.DataBind();

                dl.SelectedValue = gr_dato.DataKeys[e.Row.RowIndex].Values[0].ToString();
            }
        }