/// <summary> /// 角色信息管理查询 /// </summary> /// <param name="roleid">角色名称ID</param> /// <param name="confirmstatus">获取“显示末关闭的记录”复选框标记</param> /// <returns></returns> public DataTable Admin_Searchroledt(int roleid, string confirmstatus) { var resultdt = new DataTable(); DataTable tempdt; string sqlscript; try { //创建临时表(当没有查询到值时使用) tempdt = dlDtList.Get_Admin_roledtl(); //获取SQL语句 sqlscript = sqlList.Admin_roledtl(roleid, confirmstatus); //执行SQL语句,并返回DT var dt = GetData(sqlscript); resultdt = dt.Rows.Count == 0 ? tempdt : dt; } catch (Exception) { resultdt.Rows.Clear(); resultdt.Columns.Clear(); throw; } return(resultdt); }