Esempio n. 1
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);
    }
Esempio n. 2
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new SYS_DATASOURCE();


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


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


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


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

        try
        {
            hidCondition.Value = condObj.ToJson(20);

            listObj = BLLTable <SYS_DATASOURCE> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);

            repList.DataSource = listObj;
            repList.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }