Пример #1
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        try
        {
            if (ddl_TipoMoldura.SelectedValue != "0")
            {
                _log.CustomWriteOnLog("GestionarCatalogo", "Entro a busqueda");
                objDtoTipoMoldura.PK_ITM_Tipo = int.Parse(ddl_TipoMoldura.SelectedValue);
                _log.CustomWriteOnLog("GestionarCatalogo", "objDtoTipoMoldura.PK_ITM_Tipo : " + objDtoTipoMoldura.PK_ITM_Tipo);
                UpdatePanel.Update();
                gvCatalogo.DataSource = objCtrMoldura.ListarMoldurasByTipoMoldura(objDtoTipoMoldura);
                gvCatalogo.DataBind();
                _log.CustomWriteOnLog("GestionarCatalogo", "Paso");
            }
            else
            {
                UpdatePanel.Update();
                gvCatalogo.CssClass   = "table table-bordered table-hover js-basic-example dataTable";
                gvCatalogo.DataSource = objCtrMoldura.ListaMolduras();
                gvCatalogo.DataBind();
            }
        }
        catch (Exception ex)
        {
            _log.CustomWriteOnLog("GestionarCatalogo", "Error busqueda :" + ex.Message);

            throw;
        }
    }