item, project 를 별도 분리
lov 생성 personalInventoryToolStripMenuItem_Click 기능 추가
This commit is contained in:
@@ -14,12 +14,20 @@ namespace Project.Manager
|
||||
cn.ConnectionString = cs;
|
||||
return cn;
|
||||
}
|
||||
public static List<String> getEQGroupLiist(string GroupColumn,string table)
|
||||
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},'') != '' group by {0} order by {0}";
|
||||
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();
|
||||
@@ -32,5 +40,9 @@ namespace Project.Manager
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static List<String> getDateList(string table,string where="")
|
||||
{
|
||||
return getGroupList("pdate", table,where);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
33
Project/Manager/keyValuedataTable.cs
Normal file
33
Project/Manager/keyValuedataTable.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
|
||||
public class keyValuedataTable
|
||||
{
|
||||
System.Data.DataTable dt;
|
||||
public System.Data.DataTable DataTable
|
||||
{
|
||||
get
|
||||
{
|
||||
return dt;
|
||||
}
|
||||
}
|
||||
public keyValuedataTable()
|
||||
{
|
||||
dt = new System.Data.DataTable();
|
||||
dt.Columns.Add("key");
|
||||
dt.Columns.Add("value");
|
||||
}
|
||||
public void Add(string key, string value)
|
||||
{
|
||||
dt.Rows.Add(new string[] { key,value });
|
||||
dt.AcceptChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user