//public static DataTable ListDataByCode(string TableName, string filter) //{ // ADOSys_Config_ListPage instance = new ADOSys_Config_ListPage(); // string sql = "SELECT * FROM " + TableName + " WHERE (Stat is null or Stat=0) AND " + filter; // return instance.idb.ReturnDataTable(sql); //} ///// <summary> ///// 获取编码 ///// </summary> ///// <param name="sTable"></param> ///// <returns></returns> //public string GetTableKeyCode(string sTable) //{ // SqlParameter x1 = new SqlParameter("@sTable", SqlDbType.NChar, 40); // x1.Value = sTable.Trim(); // SqlParameter[] param = new SqlParameter[] { x1 }; // IDbDataParameter[] parames = param as IDbDataParameter[]; // DataTable dt = idb.RunProcReturnDatatable("findnewid", parames); // return dt.Rows[0][0].ToString(); //} ////ADOSys_UserPermission PermissionInstance = new ADOSys_UserPermission(); /// <summary> /// 用户权限列表 /// </summary> /// <param name="UserId">用户编码</param> /// <returns>用户权限List</returns> //public List<Sys_UserPermission> UserPermissionList(string UserId) //{ // List<Sys_UserPermission> ListPermission = PermissionInstance // .GetUserPerimission(UserId);//.Where(o => o.PU_IsCheck == "1" && (!o.PU_FunCode.StartsWith("C"))).ToList(); // return ListPermission; //} //public List<Sys_UserPermission> UserNotPermisionnList(string UserId) //{ // List<Sys_UserPermission> ListPermission = PermissionInstance // .GetUserPerimission(UserId);//.Where(o => (string.IsNullOrEmpty(o.PU_IsCheck) || o.PU_IsCheck != "1") && (!o.PU_FunCode.StartsWith("C"))).ToList(); // return ListPermission; //} //public string[] UserPermissionArray(string UserId) //{ // List<Sys_UserPermission> ListPermission = UserPermissionList(UserId); // string[] StrPermission = new string[ListPermission.Count]; // for (var i = 0; i < ListPermission.Count; i++) // { // StrPermission[i] = ListPermission[i].PU_FunCode; // } // return StrPermission; //} public string GenTableKeyCode(string sTable) { SqlParameter x1 = new SqlParameter("@sTable", SqlDbType.NChar, 40); x1.Value = sTable.Trim(); SqlParameter[] param = new SqlParameter[] { x1 }; IDbDataParameter[] parames = param as IDbDataParameter[]; DataTable dt = idb.RunProcReturnDatatable("findnewid", parames); return(dt.Rows[0][0].ToString()); }