コード例 #1
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        try
        {
            condObj = new SYS_DATASOURCE();

            if(txtID.Value !="" )
                condObj.Like(SYS_DATASOURCE.Attribute.ID, Convert.ToString(txtID.Value));

            if(txtSourceConnectString.Value !="" )
                condObj.Like(SYS_DATASOURCE.Attribute.SourceConnectString, Convert.ToString(txtSourceConnectString.Value));

            if(txtSourceType.Value !="" )
                condObj.Like(SYS_DATASOURCE.Attribute.SourceType, Convert.ToString(txtSourceType.Value));

            if(txtSourceName.Value !="" )
                condObj.Like(SYS_DATASOURCE.Attribute.SourceName, Convert.ToString(txtSourceName.Value));

            listObj = BLLTable<SYS_DATASOURCE>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);
            repCus.DataSource = listObj;
            repCus.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
        aspPager.RecordCount = recount;
    }
コード例 #2
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new SYS_DATASOURCE();

        if(txtID.Value !="" )
            condObj.Like(SYS_DATASOURCE.Attribute.ID, Convert.ToString(txtID.Value));

        if(txtSourceConnectString.Value !="" )
            condObj.Like(SYS_DATASOURCE.Attribute.SourceConnectString, Convert.ToString(txtSourceConnectString.Value));

        if(txtSourceType.Value !="" )
            condObj.Like(SYS_DATASOURCE.Attribute.SourceType, Convert.ToString(txtSourceType.Value));

        if(txtSourceName.Value !="" )
            condObj.Like(SYS_DATASOURCE.Attribute.SourceName, Convert.ToString(txtSourceName.Value));

        hidCondition.Value = condObj.ToJson(20);

        BindList(condObj, 1);
    }