public static DataTable GetUserlist() { string sql = "select FNAME from T_SEC_USER "; DataAccess.DALTranscation dal = new DataAccess.DALTranscation(); DataTable dt = dal.GetDataTableBySQLText(sql); return(dt); }
public static DataTable GetModeRoleName() { string sql = "select ModeRoleName from ModelRoleManage"; DataAccess.DALTranscation dal = new DataAccess.DALTranscation(); DataTable dt = dal.GetDataTableBySQLText(sql); return(dt); }
public static DataTable GetModeType() { string sql = "select '请选择' as ModeType, '' as value , 'A' as seq union select distinct ModeType, ModeType as value, 'b' as seq from ModelRoleManage order by seq"; DataAccess.DALTranscation dal = new DataAccess.DALTranscation(); DataTable dt = dal.GetDataTableBySQLText(sql); return(dt); }
public static bool CheckModelByUserID(int userid, string type, string mode, ref string errorMessage) { string strsql = "select * from ModelRoleManage m inner join UserRoleManage u on m.id = u.id " + "where m.moderoleName = '" + mode + "' and m.modetype = '" + type + "' and u.fuserid = " + userid + " "; DataAccess.DALTranscation dal = new DataAccess.DALTranscation(); DataTable dt = dal.GetDataTableBySQLText(strsql); if (dt != null && dt.Rows.Count > 0) { return(true); } else { errorMessage = "当前用户没有权限操作,请联系管理员."; return(false); } }
public static DataTable GetUserData(string modename, string username) { StringBuilder strSql = new StringBuilder(); strSql.Append("select t.FNAME ,m.modeRoleName, m.ModeType from ModelRoleManage m inner join UserRoleManage u on m.id = u.id "); strSql.Append(" inner join T_SEC_USER t on t.FUSERID = u.fuserid where 1=1 "); if (modename != "") { strSql.Append(" and m.modetype='" + modename + "'"); } if (username != "") { strSql.Append(" and t.FNAME like '%" + username + "%'"); } strSql.Append(" order by t.fname"); DataAccess.DALTranscation dal = new DataAccess.DALTranscation(); DataTable dt = dal.GetDataTableBySQLText(strSql.ToString()); return(dt); }