protected void EliminarRegistro(object sender, EventArgs e)
        {
            perfil_cargo tabla = new perfil_cargo();

            ObjUsuario.Error = CRUD.Delete_Fila(tabla, Convert.ToInt32(hdfIDDel.Value));
            Modal.CerrarModal("deleteModal", "DeleteModalScript", this);
            Modal.MostrarAlertaDelete(phAlerta, divAlerta, lbAlerta, ObjUsuario.Error, txtBuscar);
            LlenarGridView();
        }
示例#2
0
        private void CargarPerfil()
        {
            var _PerfilCargo = new perfil_cargo();

            _PerfilCargo = Mgr_Trabajador.Get_PerfilCargo(IDPerfil);

            txtNombre.Text         = _PerfilCargo.nombre;
            txtDescripcion.Text    = _PerfilCargo.descripcion;
            ddlCargo.SelectedValue = Convert.ToString(_PerfilCargo.id_cno);
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            perfil_cargo nuevo = new perfil_cargo()
            {
                id_empresa  = ObjUsuario.Id_empresa,
                descripcion = txtDescripcion.Text,
                nombre      = txtNombre.Text,
                id_cno      = Convert.ToInt32(ddlCargo.SelectedValue)
            };

            ObjUsuario.Error = CRUD.Add_Fila(nuevo);

            Modal.MostrarAlertaAdd(phAlerta, divAlerta, lbAlerta, ObjUsuario.Error, txtNombre);
        }