Beispiel #1
0
        /// <summary>
        /// 查询内容(权限窗体)
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="sexid"></param>
        /// <param name="closeid"></param>
        /// <param name="confirmstatus"></param>
        /// <param name="dtTime"></param>
        /// <returns></returns>
        public DataTable Admin_Searchdtldt(int userid, int sexid, string closeid, string confirmstatus, DateTime dtTime)
        {
            var       resultdt = new DataTable();
            DataTable tempdt;
            string    sqlscript;

            try
            {
                //创建临时表(当没有查询到值时使用)
                tempdt = dlDtList.Get_Admindtl();
                //获取SQL语句
                sqlscript = sqlList.Admindtl(userid, sexid, closeid, confirmstatus, dtTime);
                //执行SQL语句,并返回DT
                var dt = GetData(sqlscript);
                resultdt = dt.Rows.Count == 0 ? tempdt : dt;
            }
            catch (Exception)
            {
                resultdt.Rows.Clear();
                resultdt.Columns.Clear();
                throw;
            }
            return(resultdt);
        }