아웃룩 오픈 긴능 추가
This commit is contained in:
@@ -46,7 +46,66 @@ namespace FCOMMON
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static Dictionary<string,string> getUserList(int baseLevel = 1)
|
||||
{
|
||||
string where = "isnull(level,0) >= " + baseLevel.ToString();
|
||||
return getTwoColumnList("Users", "id", "name", where, "name");
|
||||
|
||||
}
|
||||
public static System.Data.DataTable getUserTable(int baseLevel = 1)
|
||||
{
|
||||
var list = getUserList(baseLevel);
|
||||
return MakeDataTable(list);
|
||||
}
|
||||
private static System.Data.DataTable MakeDataTable(Dictionary<string,string> list)
|
||||
{
|
||||
System.Data.DataTable dt = new System.Data.DataTable();
|
||||
dt.Columns.Add("Key");
|
||||
dt.Columns.Add("Value");
|
||||
dt.Columns.Add("KeyValue");
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
dt.Rows.Add(new string[] { item.Key, item.Value, string.Format("[{0}] {1}", item.Key, item.Value) });
|
||||
}
|
||||
dt.AcceptChanges();
|
||||
return dt;
|
||||
}
|
||||
|
||||
|
||||
public static Dictionary<string,string> getCodeList(string GroupCode="99")
|
||||
{
|
||||
string where = "Grp = '{0}'";
|
||||
where = string.Format(where, GroupCode);
|
||||
return getTwoColumnList("Common", "code", "memo", where, "code");
|
||||
}
|
||||
public static System.Data.DataTable getCodeTable(string GroupCode = "99")
|
||||
{
|
||||
var list = getCodeList(GroupCode);
|
||||
return MakeDataTable(list);
|
||||
}
|
||||
private static Dictionary<string, string> getTwoColumnList(string table,string col1,string col2,string where="",string order="")
|
||||
{
|
||||
Dictionary<string, string> retval = new Dictionary<string, string>();
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
var sql = "select isnull({1},''),isnull({2},'')" +
|
||||
" from {0}";
|
||||
if (where != "") sql += " where " + where;
|
||||
if (order != "") sql += " order by " + order;
|
||||
sql = string.Format(sql,table, col1, col2);
|
||||
var cmd = new System.Data.SqlClient.SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
retval.Add(rdr[0].ToString(), rdr[1].ToString());
|
||||
}
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
|
||||
}
|
||||
public static List<String> getGroupList(string GroupColumn, string table, string where = "",Boolean desc=false)
|
||||
{
|
||||
List<string> retval = new List<string>();
|
||||
|
||||
@@ -46,6 +46,12 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DataBaseManager.cs" />
|
||||
<Compile Include="fBase.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="fBase.Designer.cs">
|
||||
<DependentUpon>fBase.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="fLovDateList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -59,6 +65,9 @@
|
||||
<Compile Include="Util.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="fBase.resx">
|
||||
<DependentUpon>fBase.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="fLovDateList.resx">
|
||||
<DependentUpon>fLovDateList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace FCOMMON
|
||||
{
|
||||
src = DateTime.Now.ToString("yyyy-MM-") + iv.ToString("00");
|
||||
}
|
||||
else
|
||||
else if(src.Length <= 2)
|
||||
{
|
||||
//숫자이긴하나 32보다크면 오류로 한다.
|
||||
return false;
|
||||
|
||||
@@ -439,6 +439,37 @@ namespace FCOMMON
|
||||
si.Arguments = arg;
|
||||
System.Diagnostics.Process.Start(si);
|
||||
}
|
||||
public static void RunDefaultMail(string to,string title,string content="",string cc="",string bcc="")
|
||||
{
|
||||
string args = "mailto:" + to + "?";
|
||||
if (title != "") args += "subject=" + title;
|
||||
args += "&IsBodyHtml=true";
|
||||
if (content != "")
|
||||
{
|
||||
if (!args.EndsWith("?")) args += "&";
|
||||
args += "HtmlBody=" + content;
|
||||
}
|
||||
if (bcc != "")
|
||||
{
|
||||
if (!args.EndsWith("?")) args += "&";
|
||||
args += "bcc=" + bcc;
|
||||
}
|
||||
if (cc != "")
|
||||
{
|
||||
if (!args.EndsWith("?")) args += "&";
|
||||
args += "cc=" + cc;
|
||||
}
|
||||
if (bcc != "")
|
||||
{
|
||||
if (!args.EndsWith("?")) args += "&";
|
||||
args += "bcc=" + bcc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
System.Diagnostics.Process.Start(args);
|
||||
}
|
||||
|
||||
#region "watchdog"
|
||||
public static void WatchDog_Run()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -5,4 +5,5 @@ D:\Source\GroupWare\EET_GroupWare_180917_0000\SubProject\FCOMMON\obj\Debug\FCOMM
|
||||
D:\Source\GroupWare\EET_GroupWare_180917_0000\SubProject\FCOMMON\bin\Debug\ArSetting.Net4.dll
|
||||
D:\Source\GroupWare\EET_GroupWare_180917_0000\SubProject\FCOMMON\obj\Debug\FCOMMON.fLovDateList.resources
|
||||
D:\Source\GroupWare\EET_GroupWare_180917_0000\SubProject\FCOMMON\obj\Debug\FCOMMON.csproj.GenerateResource.Cache
|
||||
D:\Source\GroupWare\EET_GroupWare_180917_0000\SubProject\FCOMMON\obj\Debug\FCOMMON.fBase.resources
|
||||
D:\Source\GroupWare\EET_GroupWare_180917_0000\SubProject\FCOMMON\obj\Debug\FCOMMON.csprojResolveAssemblyReference.cache
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user