两个方法用的查询语句是一模一样的,有没有什么办法整理一下,就写一遍,用的时候调用.

问题遇到的现象和发生背景

两个方法用的查询语句是一模一样的,有没有什么办法整理一下,就写一遍,用的时候调用.

问题相关代码,请勿粘贴截图

string sqlq = "SELECT RefuseStep from flow where flowid='" + DropDownList1.Text.Trim() + "' and RefuseStep<>''";
DataTable dts1 = DataAccess.RunSQLReturnDT(sqlq);


       public DataTable GetData(string flowid)
        {
            string sqlq = "SELECT RefuseStep from flow where flowid='" + flowid + "' and RefuseStep<>''";
            DataTable dts1 = DataAccess.RunSQLReturnDT(sqlq);

            return dts1;
        }