示例#1
0
    private void LlenarForm()
    {
        this.txt_fechaEdit.Text = DateTime.Now.ToShortDateString();
        RemolcadorBC r = new RemolcadorBC();

        r.ID = int.Parse(this.hf_idremo.Value);
        r    = r.obtenerXId();
        this.hf_idsite.Value            = r.SITE_ID.ToString();
        this.ddl_siteEdit.SelectedValue = r.SITE_ID.ToString();
        cargarDropsForm();
        UsuarioRemolcadorBC ur = new UsuarioRemolcadorBC();

        this.ViewState["edit"]            = ur.obtenerUsuarioRemolcadorXRemoId(r.ID);
        this.gv_jornadaUsuario.DataSource = (DataTable)this.ViewState["edit"];
        this.gv_jornadaUsuario.DataBind();

        try
        {
            this.ddl_remoEdit.SelectedValue = r.ID.ToString();
        }
        catch (Exception)
        {
            this.ddl_remoEdit.ClearSelection();
        }
    }
示例#2
0
    protected void gv_listar_RowEditing(object sender, GridViewEditEventArgs e)
    {
        RemolcadorBC remolcador = new RemolcadorBC();

        gv_listar.SelectedIndex = e.NewEditIndex;
        hf_idRemolcador.Value   = this.gv_listar.SelectedDataKey.Value.ToString();
        remolcador                    = remolcador.obtenerXId(int.Parse(hf_idRemolcador.Value));
        txt_editCodigo.Text           = remolcador.CODIGO;
        txt_editDesc.Text             = remolcador.DESCRIPCION;
        ddl_editUsuario.SelectedValue = remolcador.ID_USUARIO.ToString();
        ddl_editSite.SelectedValue    = remolcador.SITE_ID.ToString();
        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "modalEditarRemolcador();", true);
    }