コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.centrocosto     = new CentroCosto();
            this.registro        = this.centrocosto.getCentroCosto();
            costo.DataSource     = this.registro;
            costo.DataTextField  = "NombreCentroCosto";
            costo.DataValueField = "IdCentroCosto";
            costo.DataBind();

            this.empleados = new Empleados();
            this.empleados.jquery();
            string valor = Request.QueryString["id"];
            int    id    = int.Parse(valor);

            this.empleados.jquery();
            this.registro = this.empleados.getEmpleadoPorId(id);
            if (this.registro.Read())
            {
                this.nom = this.registro["NombreEmpleado"].ToString();
                this.ape = this.registro["ApellidoEmpleado"].ToString();
                this.doc = this.registro["Documento"].ToString();
                this.cos = this.registro["IdCentroCosto"].ToString();
                this.est = this.registro["Estado"].ToString();
                this.IdEmpleado.Value = valor;
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.centrocosto = new CentroCosto();
            this.registro    = this.centrocosto.getCentroCosto();

            costo.DataSource     = this.registro;
            costo.DataTextField  = "NombreCentroCosto";
            costo.DataValueField = "IdCentroCosto";
            costo.DataBind();
            //costo.Items.Insert(0, new ListItem("Seleccione..", "0"));

            /*
             * costo.Items.Insert(1, new ListItem("LAN", "1"));
             * costo.Items.Insert(2, new ListItem("TIGO", "2"));
             * costo.Items.Insert(3, new ListItem("MOVIL RED", "3"));
             */
            this.empleados = new Empleados();
            this.empleados.jquery();
        }