챔피언

This commit is contained in:
chi
2023-05-30 11:03:12 +09:00
parent a74a47b582
commit 0da45cf931
32 changed files with 23256 additions and 1684 deletions

View File

@@ -1341,7 +1341,42 @@ namespace FCOMMON
cn.Dispose();
return retval != 0;
}
public static List<String> getGroupListWithoutGcode(string GroupColumn, string table, string where = "", Boolean desc = false, Boolean useColumncover = true)
{
List<string> retval = new List<string>();
var cn = getCn();
cn.Open();
var sql = "select {0} " +
" from {1} " +
" where isnull({0},'') != '' ";
if (table.ToUpper() == "USERS")
sql = "select {0} " +
" from {1} " +
" where isnull({0},'') != '' ";
if (where != "") sql += " and " + where;
sql += " group by {0} " +
" order by {0} ";
if (desc) sql += " desc";
if (useColumncover)
sql = string.Format(sql, "[" + GroupColumn + "]", table);
else
sql = string.Format(sql, GroupColumn, table);
var cmd = new SqlCommand(sql, cn);
var rdr = cmd.ExecuteReader();
while (rdr.Read())
{
retval.Add(rdr[0].ToString());
}
cmd.Dispose();
cn.Close();
cn.Dispose();
return retval;
}
public static List<String> getGroupList(string GroupColumn, string table, string where = "", Boolean desc = false, Boolean useColumncover = true)
{
List<string> retval = new List<string>();