item, project 를 별도 분리

lov 생성
personalInventoryToolStripMenuItem_Click 기능 추가
This commit is contained in:
chikyun.kim
2018-09-18 12:46:53 +09:00
parent c209a974c0
commit 2d4fe18264
41 changed files with 10954 additions and 1489 deletions

View File

@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FCOMMON
{
public static class DBM
{
private static System.Data.SqlClient.SqlConnection getCn()
{
string cs = FCOMMON.info.CS;
System.Data.SqlClient.SqlConnection cn = new System.Data.SqlClient.SqlConnection();
cn.ConnectionString = cs;
return cn;
}
public static List<String> getGroupList(string GroupColumn, string table, string where = "")
{
List<string> retval = new List<string>();
var cn = getCn();
cn.Open();
var sql = "select {0} " +
" from {1} " +
" where isnull({0},'') != '' ";
if (where != "") sql += " and " + where;
sql += " group by {0} " +
" order by {0}";
sql = string.Format(sql, "[" + GroupColumn + "]", table);
var cmd = new System.Data.SqlClient.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> getDateList(string table, string where = "")
{
return getGroupList("pdate", table, where);
}
}
}