181210 chi NR구매등록시 이미지 표시 및 추가 기능
NR구매목록에서 권한 없는 사람이 더블클릭으로 편집할 수 있는 버그 수정
This commit is contained in:
@@ -1,46 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static partial class DBM
|
||||
{
|
||||
|
||||
public enum eAutoType
|
||||
{
|
||||
purchase,
|
||||
holyday
|
||||
}
|
||||
public static int getAuth(eAutoType type, string uid)
|
||||
{
|
||||
return getAuth(type.ToString(), uid);
|
||||
}
|
||||
public static int getAuth(eAutoType type)
|
||||
{
|
||||
return getAuth(type.ToString(), info.Login.no);
|
||||
}
|
||||
|
||||
|
||||
private static int getAuth(string field,string uid)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
int retval = 0;
|
||||
|
||||
string sql = string.Format("select isnull([{0}],0) from Auth where [user]= '{1}'",field,uid);
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteScalar();
|
||||
if(rdr != null )
|
||||
retval = int.Parse(rdr.ToString());
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static partial class DBM
|
||||
{
|
||||
|
||||
public enum eAutoType
|
||||
{
|
||||
purchase,
|
||||
holyday
|
||||
}
|
||||
public static int getAuth(eAutoType type, string uid)
|
||||
{
|
||||
return getAuth(type.ToString(), uid);
|
||||
}
|
||||
public static int getAuth(eAutoType type)
|
||||
{
|
||||
return getAuth(type.ToString(), info.Login.no);
|
||||
}
|
||||
|
||||
|
||||
private static int getAuth(string field,string uid)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
int retval = 0;
|
||||
|
||||
string sql = string.Format("select isnull([{0}],0) from Auth where [user]= '{1}'",field,uid);
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteScalar();
|
||||
if(rdr != null )
|
||||
retval = int.Parse(rdr.ToString());
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,392 +1,539 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static partial class DBM
|
||||
{
|
||||
public static SqlConnection getCn()
|
||||
{
|
||||
string cs = FCOMMON.info.CS;
|
||||
SqlConnection cn = new SqlConnection();
|
||||
cn.ConnectionString = cs;
|
||||
return cn;
|
||||
}
|
||||
|
||||
public struct sItemInfo
|
||||
{
|
||||
public int idx;
|
||||
public string sid;
|
||||
public string model;
|
||||
public string supply;
|
||||
public string name;
|
||||
public string unit;
|
||||
public float scale;
|
||||
public string price;
|
||||
public int supplyidx;
|
||||
public string project;
|
||||
public int qty;
|
||||
}
|
||||
|
||||
public static Boolean setImageData(System.Drawing.Image img, string table, string field, int idx)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
Boolean retval = false;
|
||||
string sql = "update " + table + " set " + field + " = @data" + " where idx = @idx";
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
|
||||
System.IO.MemoryStream sm = new System.IO.MemoryStream();
|
||||
img.Save(sm, System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||
var buffer = sm.GetBuffer();
|
||||
sm.Dispose();
|
||||
|
||||
cmd.Parameters.Add(new SqlParameter("idx", idx));
|
||||
cmd.Parameters.Add(new SqlParameter("data", buffer));
|
||||
try
|
||||
{
|
||||
cmd.ExecuteNonQuery();
|
||||
retval = true;
|
||||
}catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static System.Drawing.Image GetImageData(string table,string field,int idx)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
|
||||
string sql = "select " + field + " from "+table+" where idx = " + idx.ToString();
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var data = cmd.ExecuteScalar() as byte[];
|
||||
System.Drawing.Bitmap bmp = null;
|
||||
if(data != null)
|
||||
{
|
||||
System.IO.MemoryStream ms = new System.IO.MemoryStream(data);
|
||||
bmp = new System.Drawing.Bitmap(ms, true);
|
||||
ms.Dispose();
|
||||
}
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return bmp;
|
||||
}
|
||||
|
||||
public static sItemInfo getLastPurchaseInfo(int idx)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
var retval = new sItemInfo();
|
||||
retval.idx = -1;
|
||||
|
||||
string sql = "select isnull(max(idx),-1) from Purchase where pumidx = " + idx.ToString();
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
int maxidx = int.Parse(cmd.ExecuteScalar().ToString());
|
||||
if (maxidx == -1) return retval;
|
||||
|
||||
cmd.CommandText = "select * from Purchase where idx = " + maxidx.ToString();
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
retval.idx = (int)rdr["idx"];
|
||||
if (rdr["sid"] != DBNull.Value) retval.sid = rdr["sid"].ToString();
|
||||
if (rdr["pumscale"] != DBNull.Value) retval.model = rdr["pumscale"].ToString();
|
||||
if (rdr["supply"] != DBNull.Value) retval.supply = rdr["supply"].ToString();
|
||||
if (rdr["supplyidx"] != DBNull.Value) retval.supplyidx = int.Parse(rdr["supplyidx"].ToString());
|
||||
else retval.supplyidx = -1;
|
||||
|
||||
if (rdr["pumname"] != DBNull.Value) retval.name = rdr["pumname"].ToString();
|
||||
if (rdr["pumunit"] != DBNull.Value) retval.unit = rdr["pumunit"].ToString();
|
||||
if (rdr["project"] != DBNull.Value) retval.project = rdr["project"].ToString();
|
||||
|
||||
if (rdr["pumprice"] != DBNull.Value) retval.price = rdr["pumprice"].ToString();
|
||||
else retval.price = "0";
|
||||
|
||||
if (rdr["pumqty"] != DBNull.Value) retval.qty = int.Parse(rdr["pumqty"].ToString());
|
||||
else retval.qty = 0;
|
||||
|
||||
}
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
public static sItemInfo getItemInfo(int idx)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
var retval = new sItemInfo();
|
||||
retval.idx = -1;
|
||||
|
||||
string sql = "select * from Items where idx = " + idx.ToString();
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while(rdr.Read())
|
||||
{
|
||||
retval.idx = (int)rdr["idx"];
|
||||
if(rdr["sid"] != DBNull.Value) retval.sid = rdr["sid"].ToString();
|
||||
if (rdr["model"] != DBNull.Value) retval.model = rdr["model"].ToString();
|
||||
if (rdr["supply"] != DBNull.Value) retval.supply = rdr["supply"].ToString();
|
||||
if (rdr["supplyidx"] != DBNull.Value) retval.supplyidx = int.Parse(rdr["supplyidx"].ToString());
|
||||
|
||||
if (rdr["name"] != DBNull.Value) retval.name = rdr["name"].ToString();
|
||||
if (rdr["unit"] != DBNull.Value) retval.unit = rdr["unit"].ToString();
|
||||
if (rdr["scale"] != DBNull.Value) retval.scale = float.Parse(rdr["scale"].ToString());
|
||||
if (rdr["price"] != DBNull.Value) retval.price = rdr["price"].ToString();
|
||||
|
||||
}
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static int addItemInfo(sItemInfo info)
|
||||
{
|
||||
int retval = -1;
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
string sql = "insert into Items" +
|
||||
" ([cate],[sid],[model],[supply],[supplyidx],[name],[unit],[scale],[price],[wuid],[wdate])" +
|
||||
" values " +
|
||||
" (@cate,@sid,@model,@supply,@supplyidx,@name,@unit,@scale,@price,@wuid,@wdate)";
|
||||
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
cmd.Parameters.Add(new SqlParameter("@cate", "etc"));
|
||||
cmd.Parameters.Add(new SqlParameter("@sid", info.sid));
|
||||
cmd.Parameters.Add(new SqlParameter("@model", info.model));
|
||||
cmd.Parameters.Add(new SqlParameter("@supply", info.supply));
|
||||
cmd.Parameters.Add(new SqlParameter("@supplyidx", info.supplyidx));
|
||||
cmd.Parameters.Add(new SqlParameter("@name", info.name));
|
||||
cmd.Parameters.Add(new SqlParameter("@unit", info.unit));
|
||||
cmd.Parameters.Add(new SqlParameter("@scale", info.scale));
|
||||
cmd.Parameters.Add(new SqlParameter("@price", info.price));
|
||||
cmd.Parameters.Add(new SqlParameter("@wuid", FCOMMON.info.Login.no));
|
||||
cmd.Parameters.Add(new SqlParameter("@wdate", DateTime.Now));
|
||||
|
||||
var iCnt = cmd.ExecuteNonQuery();
|
||||
if(iCnt == 1)
|
||||
{
|
||||
cmd.CommandText = "select isnull(idx,-1) from Items where [sid] = @sid";
|
||||
cmd.Parameters.Clear();
|
||||
cmd.Parameters.Add(new SqlParameter("sid", info.sid));
|
||||
retval = (int)cmd.ExecuteScalar();
|
||||
}
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static sItemInfo getItemInfo(string sid)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
var retval = new sItemInfo();
|
||||
retval.idx = -1;
|
||||
|
||||
string sql = "select * from Items where [sid] = '" + sid + "'";
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
retval.idx = (int)rdr["idx"];
|
||||
if (rdr["sid"] != DBNull.Value) retval.sid = rdr["sid"].ToString();
|
||||
if (rdr["model"] != DBNull.Value) retval.model = rdr["model"].ToString();
|
||||
if (rdr["supply"] != DBNull.Value) retval.supply = rdr["supply"].ToString();
|
||||
if (rdr["supplyidx"] != DBNull.Value) retval.supplyidx = int.Parse(rdr["supplyidx"].ToString());
|
||||
|
||||
if (rdr["name"] != DBNull.Value) retval.name = rdr["name"].ToString();
|
||||
if (rdr["unit"] != DBNull.Value) retval.unit = rdr["unit"].ToString();
|
||||
if (rdr["scale"] != DBNull.Value) retval.scale = float.Parse(rdr["scale"].ToString());
|
||||
if (rdr["price"] != DBNull.Value) retval.price = rdr["price"].ToString();
|
||||
}
|
||||
|
||||
cn.Close();
|
||||
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 Dictionary<string,string> MakeDataTable(List<string> list)
|
||||
{
|
||||
var retval = new Dictionary<string, string>();
|
||||
foreach (var item in list)
|
||||
retval.Add(item, item);
|
||||
return retval;
|
||||
}
|
||||
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> getProjectList(string StateCode = "")
|
||||
{
|
||||
string where = "status = '{0}'";
|
||||
if (StateCode != "") where = string.Format(where, StateCode);
|
||||
else where = string.Empty;
|
||||
|
||||
return getTwoColumnList("Projects", "idx", "name", where, "status,name");
|
||||
}
|
||||
public static System.Data.DataTable getProjectData(string StateCode = "")
|
||||
{
|
||||
var list = getProjectList(StateCode);
|
||||
return MakeDataTable(list);
|
||||
}
|
||||
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 string getCodeSavlue(string GroupCode, string code)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
var sql = "select isnull(SValue,'')" +
|
||||
" from Common" +
|
||||
" where Grp = '{0}' and code = '{1}'";
|
||||
|
||||
sql = string.Format(sql, GroupCode, code);
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var data = cmd.ExecuteScalar();
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return data.ToString();
|
||||
|
||||
}
|
||||
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 SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
retval.Add(rdr[0].ToString(), rdr[1].ToString());
|
||||
}
|
||||
rdr.Close();
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
|
||||
}
|
||||
public static Dictionary<string,string> getGroupTable(string GroupColumn, string table, string where = "", Boolean desc = false)
|
||||
{
|
||||
var list = getGroupList(GroupColumn, table, where, desc);
|
||||
return MakeDataTable(list);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 데이터중 첫번째 자료를 반환 합니다.
|
||||
/// </summary>
|
||||
/// <param name="column"></param>
|
||||
/// <param name="table"></param>
|
||||
/// <param name="where"></param>
|
||||
/// <param name="order"></param>
|
||||
/// <returns></returns>
|
||||
public static String getFirstValue(string column,string table,string where="",string order="")
|
||||
{
|
||||
string retval = string.Empty;
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
var sql = "select {0} " +
|
||||
" from {1} " +
|
||||
" where isnull({0},'') != '' ";
|
||||
|
||||
if (where != "") sql += " and " + where;
|
||||
if (order != "") sql += " order by " + order;
|
||||
|
||||
sql = string.Format(sql, "[" + column + "]", table);
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
if (rdr[0] != null) retval = 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)
|
||||
{
|
||||
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} ";
|
||||
if (desc) sql += " desc";
|
||||
|
||||
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> getDateList(string table, string where = "",Boolean desc =false)
|
||||
{
|
||||
return getGroupList("pdate", table, where,desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static partial class DBM
|
||||
{
|
||||
public static SqlConnection getCn()
|
||||
{
|
||||
string cs = FCOMMON.info.CS;
|
||||
SqlConnection cn = new SqlConnection();
|
||||
cn.ConnectionString = cs;
|
||||
return cn;
|
||||
}
|
||||
|
||||
public struct sItemInfo
|
||||
{
|
||||
public int idx;
|
||||
public string sid;
|
||||
public string model;
|
||||
public string supply;
|
||||
public string name;
|
||||
public string unit;
|
||||
public float scale;
|
||||
public string price;
|
||||
public int supplyidx;
|
||||
public string project;
|
||||
public int qty;
|
||||
}
|
||||
|
||||
public static byte[] getImagByteArray(System.Drawing.Image img)
|
||||
{
|
||||
if (img == null || img.Width < 1 || img.Height < 1) return null;
|
||||
System.IO.MemoryStream sm = new System.IO.MemoryStream();
|
||||
img.Save(sm, System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||
var buffer = sm.GetBuffer();
|
||||
sm.Dispose();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public static Boolean setImageData(System.Drawing.Image img, string table, string field, int idx)
|
||||
{
|
||||
if (img == null || img.Width < 1||img.Height < 1) return false;
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
Boolean retval = false;
|
||||
string sql = "update " + table + " set " + field + " = @data" + " where idx = @idx";
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
|
||||
System.IO.MemoryStream sm = new System.IO.MemoryStream();
|
||||
img.Save(sm, System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||
var buffer = sm.GetBuffer();
|
||||
sm.Dispose();
|
||||
|
||||
cmd.Parameters.Add(new SqlParameter("idx", idx));
|
||||
cmd.Parameters.Add(new SqlParameter("data", buffer));
|
||||
try
|
||||
{
|
||||
cmd.ExecuteNonQuery();
|
||||
retval = true;
|
||||
}catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static System.Drawing.Image GetImageData(string table,string field,int idx)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
|
||||
string sql = "select " + field + " from "+table+" where idx = " + idx.ToString();
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var data = cmd.ExecuteScalar() as byte[];
|
||||
System.Drawing.Bitmap bmp = null;
|
||||
if(data != null)
|
||||
{
|
||||
System.IO.MemoryStream ms = new System.IO.MemoryStream(data);
|
||||
bmp = new System.Drawing.Bitmap(ms, true);
|
||||
ms.Dispose();
|
||||
}
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return bmp;
|
||||
}
|
||||
|
||||
public static sItemInfo getLastPurchaseInfo(int idx)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
var retval = new sItemInfo();
|
||||
retval.idx = -1;
|
||||
|
||||
string sql = "select isnull(max(idx),-1) from Purchase where pumidx = " + idx.ToString();
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
int maxidx = int.Parse(cmd.ExecuteScalar().ToString());
|
||||
if (maxidx == -1) return retval;
|
||||
|
||||
cmd.CommandText = "select * from Purchase where idx = " + maxidx.ToString();
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
retval.idx = (int)rdr["idx"];
|
||||
if (rdr["sid"] != DBNull.Value) retval.sid = rdr["sid"].ToString();
|
||||
if (rdr["pumscale"] != DBNull.Value) retval.model = rdr["pumscale"].ToString();
|
||||
if (rdr["supply"] != DBNull.Value) retval.supply = rdr["supply"].ToString();
|
||||
if (rdr["supplyidx"] != DBNull.Value) retval.supplyidx = int.Parse(rdr["supplyidx"].ToString());
|
||||
else retval.supplyidx = -1;
|
||||
|
||||
if (rdr["pumname"] != DBNull.Value) retval.name = rdr["pumname"].ToString();
|
||||
if (rdr["pumunit"] != DBNull.Value) retval.unit = rdr["pumunit"].ToString();
|
||||
if (rdr["project"] != DBNull.Value) retval.project = rdr["project"].ToString();
|
||||
|
||||
if (rdr["pumprice"] != DBNull.Value) retval.price = rdr["pumprice"].ToString();
|
||||
else retval.price = "0";
|
||||
|
||||
if (rdr["pumqty"] != DBNull.Value) retval.qty = int.Parse(rdr["pumqty"].ToString());
|
||||
else retval.qty = 0;
|
||||
|
||||
}
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
public static sItemInfo getItemInfo(int idx)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
var retval = new sItemInfo();
|
||||
retval.idx = -1;
|
||||
|
||||
string sql = "select * from Items where idx = " + idx.ToString();
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while(rdr.Read())
|
||||
{
|
||||
retval.idx = (int)rdr["idx"];
|
||||
if(rdr["sid"] != DBNull.Value) retval.sid = rdr["sid"].ToString();
|
||||
if (rdr["model"] != DBNull.Value) retval.model = rdr["model"].ToString();
|
||||
if (rdr["supply"] != DBNull.Value) retval.supply = rdr["supply"].ToString();
|
||||
if (rdr["supplyidx"] != DBNull.Value) retval.supplyidx = int.Parse(rdr["supplyidx"].ToString());
|
||||
|
||||
if (rdr["name"] != DBNull.Value) retval.name = rdr["name"].ToString();
|
||||
if (rdr["unit"] != DBNull.Value) retval.unit = rdr["unit"].ToString();
|
||||
if (rdr["scale"] != DBNull.Value) retval.scale = float.Parse(rdr["scale"].ToString());
|
||||
if (rdr["price"] != DBNull.Value) retval.price = rdr["price"].ToString();
|
||||
|
||||
}
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static int addItemInfo(sItemInfo info)
|
||||
{
|
||||
int retval = -1;
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
string sql = "insert into Items" +
|
||||
" ([cate],[sid],[model],[supply],[supplyidx],[name],[unit],[scale],[price],[wuid],[wdate])" +
|
||||
" values " +
|
||||
" (@cate,@sid,@model,@supply,@supplyidx,@name,@unit,@scale,@price,@wuid,@wdate)";
|
||||
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
cmd.Parameters.Add(new SqlParameter("@cate", "etc"));
|
||||
cmd.Parameters.Add(new SqlParameter("@sid", info.sid));
|
||||
cmd.Parameters.Add(new SqlParameter("@model", info.model));
|
||||
cmd.Parameters.Add(new SqlParameter("@supply", info.supply));
|
||||
cmd.Parameters.Add(new SqlParameter("@supplyidx", info.supplyidx));
|
||||
cmd.Parameters.Add(new SqlParameter("@name", info.name));
|
||||
cmd.Parameters.Add(new SqlParameter("@unit", info.unit));
|
||||
cmd.Parameters.Add(new SqlParameter("@scale", info.scale));
|
||||
cmd.Parameters.Add(new SqlParameter("@price", info.price));
|
||||
cmd.Parameters.Add(new SqlParameter("@wuid", FCOMMON.info.Login.no));
|
||||
cmd.Parameters.Add(new SqlParameter("@wdate", DateTime.Now));
|
||||
|
||||
var iCnt = cmd.ExecuteNonQuery();
|
||||
if(iCnt == 1)
|
||||
{
|
||||
cmd.CommandText = "select isnull(idx,-1) from Items where [sid] = @sid";
|
||||
cmd.Parameters.Clear();
|
||||
cmd.Parameters.Add(new SqlParameter("sid", info.sid));
|
||||
retval = (int)cmd.ExecuteScalar();
|
||||
}
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static sItemInfo getItemInfo(string sid)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
var retval = new sItemInfo();
|
||||
retval.idx = -1;
|
||||
|
||||
string sql = "select * from Items where [sid] = '" + sid + "'";
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
retval.idx = (int)rdr["idx"];
|
||||
if (rdr["sid"] != DBNull.Value) retval.sid = rdr["sid"].ToString();
|
||||
if (rdr["model"] != DBNull.Value) retval.model = rdr["model"].ToString();
|
||||
if (rdr["supply"] != DBNull.Value) retval.supply = rdr["supply"].ToString();
|
||||
if (rdr["supplyidx"] != DBNull.Value) retval.supplyidx = int.Parse(rdr["supplyidx"].ToString());
|
||||
|
||||
if (rdr["name"] != DBNull.Value) retval.name = rdr["name"].ToString();
|
||||
if (rdr["unit"] != DBNull.Value) retval.unit = rdr["unit"].ToString();
|
||||
if (rdr["scale"] != DBNull.Value) retval.scale = float.Parse(rdr["scale"].ToString());
|
||||
if (rdr["price"] != DBNull.Value) retval.price = rdr["price"].ToString();
|
||||
}
|
||||
|
||||
cn.Close();
|
||||
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 Dictionary<string,string> MakeDataTable(List<string> list)
|
||||
{
|
||||
var retval = new Dictionary<string, string>();
|
||||
foreach (var item in list)
|
||||
retval.Add(item, item);
|
||||
return retval;
|
||||
}
|
||||
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> getProjectList(string StateCode = "")
|
||||
{
|
||||
string where = "status = '{0}'";
|
||||
if (StateCode != "") where = string.Format(where, StateCode);
|
||||
else where = string.Empty;
|
||||
|
||||
return getTwoColumnList("Projects", "idx", "name", where, "status,name");
|
||||
}
|
||||
public static System.Data.DataTable getProjectData(string StateCode = "")
|
||||
{
|
||||
var list = getProjectList(StateCode);
|
||||
return MakeDataTable(list);
|
||||
}
|
||||
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 string getCodeSavlue(string GroupCode, string code)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
var sql = "select isnull(SValue,'')" +
|
||||
" from Common" +
|
||||
" where Grp = '{0}' and code = '{1}'";
|
||||
|
||||
sql = string.Format(sql, GroupCode, code);
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var data = cmd.ExecuteScalar();
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return data.ToString();
|
||||
|
||||
}
|
||||
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 SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
retval.Add(rdr[0].ToString(), rdr[1].ToString());
|
||||
}
|
||||
rdr.Close();
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
|
||||
}
|
||||
public static Dictionary<string,string> getGroupTable(string GroupColumn, string table, string where = "", Boolean desc = false)
|
||||
{
|
||||
var list = getGroupList(GroupColumn, table, where, desc);
|
||||
return MakeDataTable(list);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 데이터중 첫번째 자료를 반환 합니다.
|
||||
/// </summary>
|
||||
/// <param name="column"></param>
|
||||
/// <param name="table"></param>
|
||||
/// <param name="where"></param>
|
||||
/// <param name="order"></param>
|
||||
/// <returns></returns>
|
||||
public static String getFirstValue(string column,string table,string where="",string order="")
|
||||
{
|
||||
string retval = string.Empty;
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
var sql = "select {0} " +
|
||||
" from {1} " +
|
||||
" where isnull({0},'') != '' ";
|
||||
|
||||
if (where != "") sql += " and " + where;
|
||||
if (order != "") sql += " order by " + order;
|
||||
|
||||
sql = string.Format(sql, "[" + column + "]", table);
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
if (rdr[0] != null) retval = rdr[0].ToString();
|
||||
}
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
|
||||
public static int addItem(string pumname,string sid, string model, decimal price, string supply ,int supplyidx = -1,byte[] pic = null)
|
||||
{
|
||||
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
int retval = -1;
|
||||
var cmd2 = new SqlCommand("", cn);
|
||||
|
||||
cmd2.CommandText = "select count(*) from Items where name ='" + pumname + "'";
|
||||
var cnt = int.Parse(cmd2.ExecuteScalar().ToString());
|
||||
if (cnt == 0)
|
||||
{
|
||||
DateTime wdate = DateTime.Now;
|
||||
|
||||
if(pic == null)
|
||||
{
|
||||
cmd2.CommandText = "insert into items(cate,name,sid,model,scale,unit,supply,supplyidx,price,wuid,wdate)" +
|
||||
"values(@cate,@name,@sid,@model,@scale,@unit,@supply,@supplyidx,@price,@wuid,@wdate)";
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd2.CommandText = "insert into items(cate,name,sid,model,scale,unit,supply,supplyidx,price,image,wuid,wdate)" +
|
||||
"values(@cate,@name,@sid,@model,@scale,@unit,@supply,@supplyidx,@price,@image,@wuid,@wdate)";
|
||||
}
|
||||
|
||||
|
||||
|
||||
cmd2.Parameters.Clear();
|
||||
cmd2.Parameters.Add(new SqlParameter("cate", "--"));
|
||||
cmd2.Parameters.Add(new SqlParameter("name", pumname));
|
||||
cmd2.Parameters.Add(new SqlParameter("sid", sid));
|
||||
cmd2.Parameters.Add(new SqlParameter("model", model));
|
||||
cmd2.Parameters.Add(new SqlParameter("scale", 1.0));
|
||||
cmd2.Parameters.Add(new SqlParameter("unit", "EA"));
|
||||
cmd2.Parameters.Add(new SqlParameter("supply", supply));
|
||||
if (pic != null) cmd2.Parameters.Add(new SqlParameter("image", pic));
|
||||
cmd2.Parameters.Add(new SqlParameter("supplyidx", supplyidx));
|
||||
cmd2.Parameters.Add(new SqlParameter("price", price));
|
||||
cmd2.Parameters.Add(new SqlParameter("wuid", FCOMMON.info.Login.no));
|
||||
cmd2.Parameters.Add(new SqlParameter("wdate", wdate));
|
||||
retval += cmd2.ExecuteNonQuery();
|
||||
|
||||
if (retval == 0)
|
||||
{
|
||||
cmd2.CommandText = "select idx from Items where name = @name and sid = @sid and model = @model and wuid = @wuid and wdate = @wdate";
|
||||
retval = int.Parse(cmd2.ExecuteScalar().ToString());
|
||||
}
|
||||
else retval = -1;
|
||||
}
|
||||
|
||||
cmd2.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>();
|
||||
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} ";
|
||||
if (desc) sql += " desc";
|
||||
|
||||
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> getDateList(string table, string where = "",Boolean desc =false)
|
||||
{
|
||||
return getGroupList("pdate", table, where,desc);
|
||||
}
|
||||
|
||||
public static int UpdateItemIndexbySID()
|
||||
{
|
||||
int retval = 0;
|
||||
var cn1 = getCn();
|
||||
cn1.Open();
|
||||
|
||||
var cn2 = getCn();
|
||||
cn2.Open();
|
||||
|
||||
var sql = "select idx, " +
|
||||
" isnull(pumname,'') as pumname, " +
|
||||
" isnull([sid],'') as [sid], " +
|
||||
" isnull(pumscale,'') as pummodel, " +
|
||||
" isnull(pumunit,'EA') as pumunit, " +
|
||||
" isnull(pumprice,0) as pumprice, " +
|
||||
" isnull(supply,'') as supply, " +
|
||||
" isnull(supplyidx,-1) as supplyidx" +
|
||||
" from purchase " +
|
||||
" where isnull(sid,'') <> '' and " +
|
||||
" isnull(sid,'') <> '신규'" +
|
||||
" and isnull(pumidx,-1) = -1 " +
|
||||
" and len(sid) = 9" +
|
||||
" and isnull(pumname,'') <> ''";
|
||||
|
||||
var cmd2 = new SqlCommand("", cn2);
|
||||
var cmd = new SqlCommand(sql, cn1);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
var pumname = rdr["pumname"].ToString();
|
||||
var pummodel = rdr["pummodel"].ToString();
|
||||
var pumunit = rdr["pumunit"].ToString();
|
||||
var pumprice = decimal.Parse(rdr["pumprice"].ToString());
|
||||
var supply = rdr["supply"].ToString();
|
||||
var supplyidx = int.Parse(rdr["supplyidx"].ToString());
|
||||
|
||||
var sid = rdr["sid"].ToString();
|
||||
var idx = int.Parse(rdr["idx"].ToString());
|
||||
|
||||
//아이템정보에서 이 sid 가 1개 존재한다면 그것에 연결한다.
|
||||
var sql2 = "select isnull(idx,-1) from Items where [sid] = '"+sid+"'";
|
||||
cmd2.CommandText = sql2;
|
||||
|
||||
var itemdata = cmd2.ExecuteScalar();
|
||||
if(itemdata != null && itemdata.ToString() != "-1")
|
||||
{
|
||||
cmd2.CommandText = "update purchase set pumidx = " + itemdata.ToString() + " where idx=" + idx.ToString();
|
||||
retval += cmd2.ExecuteNonQuery();
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd2.CommandText = "insert into items(cate,name,sid,model,scale,unit,supply,supplyidx,price,wuid,wdate)" +
|
||||
"values(@cate,@name,@sid,@model,@scale,@unit,@supply,@supplyidx,@price,@wuid,@wdate)";
|
||||
cmd2.Parameters.Clear();
|
||||
cmd2.Parameters.Add(new SqlParameter("cate", "--"));
|
||||
cmd2.Parameters.Add(new SqlParameter("name", pumname));
|
||||
cmd2.Parameters.Add(new SqlParameter("sid", sid));
|
||||
cmd2.Parameters.Add(new SqlParameter("model", pummodel));
|
||||
cmd2.Parameters.Add(new SqlParameter("scale",1.0));
|
||||
cmd2.Parameters.Add(new SqlParameter("unit", pumunit));
|
||||
cmd2.Parameters.Add(new SqlParameter("supply", supply));
|
||||
cmd2.Parameters.Add(new SqlParameter("supplyidx", supplyidx));
|
||||
cmd2.Parameters.Add(new SqlParameter("price", pumprice));
|
||||
cmd2.Parameters.Add(new SqlParameter("wuid", "dev"));
|
||||
cmd2.Parameters.Add(new SqlParameter("wdate", DateTime.Now));
|
||||
retval += cmd2.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
cmd2.Dispose();
|
||||
cmd.Dispose();
|
||||
cn1.Close();
|
||||
cn1.Dispose();
|
||||
|
||||
cn2.Close();
|
||||
cn2.Dispose();
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,100 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{304BD018-194B-47DA-B4E0-F16DF7B606DA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>FCOMMON</RootNamespace>
|
||||
<AssemblyName>FCOMMON</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArSetting.Net4">
|
||||
<HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FarPoint.CalcEngine, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.Excel, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.Localization, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.PDF, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.PluginCalendar.WinForms, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.Win, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.Win.Chart, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.Win.Spread, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457, processorArchitecture=MSIL" />
|
||||
<Reference Include="GrapeCity.CalcEngine, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="GrapeCity.Spreadsheet, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="GrapeCity.Spreadsheet.Win, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="GrapeCity.Win.PluginInputMan, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457, processorArchitecture=MSIL" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Auth.cs" />
|
||||
<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>
|
||||
<Compile Include="fLovDateList.Designer.cs">
|
||||
<DependentUpon>fLovDateList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="keyValuedataTable.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Info.cs" />
|
||||
<Compile Include="FormUtil.cs" />
|
||||
<Compile Include="Util.cs" />
|
||||
<Compile Include="Util_Farpoint.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="fBase.resx">
|
||||
<DependentUpon>fBase.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="fLovDateList.resx">
|
||||
<DependentUpon>fLovDateList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{304BD018-194B-47DA-B4E0-F16DF7B606DA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>FCOMMON</RootNamespace>
|
||||
<AssemblyName>FCOMMON</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArSetting.Net4">
|
||||
<HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FarPoint.CalcEngine, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.Excel, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.Localization, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.PDF, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.PluginCalendar.WinForms, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.Win, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.Win.Chart, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="FarPoint.Win.Spread, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457, processorArchitecture=MSIL" />
|
||||
<Reference Include="GrapeCity.CalcEngine, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="GrapeCity.Spreadsheet, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="GrapeCity.Spreadsheet.Win, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" />
|
||||
<Reference Include="GrapeCity.Win.PluginInputMan, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457, processorArchitecture=MSIL" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Auth.cs" />
|
||||
<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>
|
||||
<Compile Include="fLovDateList.Designer.cs">
|
||||
<DependentUpon>fLovDateList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="keyValuedataTable.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Info.cs" />
|
||||
<Compile Include="FormUtil.cs" />
|
||||
<Compile Include="Util.cs" />
|
||||
<Compile Include="Util_Farpoint.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="fBase.resx">
|
||||
<DependentUpon>fBase.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="fLovDateList.resx">
|
||||
<DependentUpon>fLovDateList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -1,111 +1,111 @@
|
||||
//190806 chi getWorkWeek 추가
|
||||
//190805 chi MakeCSVString 추가
|
||||
//180903 chi makefilepath/ ftppath 추가
|
||||
//180807 chi rad2deg, deg2rad 추가
|
||||
//180625 chi ToCharHexString,ToStringFromHexString 추가
|
||||
//180624 chi isLocalApplication 추가
|
||||
//180618 chi GetCSVBuffer 추가
|
||||
//180614 chi map 명령어 추가
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static partial class Util
|
||||
{
|
||||
public static Boolean MakeDateString(string src, out string data)
|
||||
{
|
||||
data = src;
|
||||
string dtStr = string.Empty;
|
||||
DateTime dt;
|
||||
int iv;
|
||||
if (int.TryParse(src, out iv))
|
||||
{
|
||||
if (iv <= 31)
|
||||
{
|
||||
src = DateTime.Now.ToString("yyyy-MM-") + iv.ToString("00");
|
||||
}
|
||||
else if(src.Length <= 2)
|
||||
{
|
||||
//숫자이긴하나 32보다크면 오류로 한다.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
src = src.Replace("/", "-");
|
||||
if (src.Length < 4)
|
||||
{
|
||||
src = src.PadLeft(4, '0');
|
||||
}
|
||||
if(src.Length==4)
|
||||
{
|
||||
src = DateTime.Now.ToString("yyyy") + "-" + src.Substring(0, 2) + "-" + src.Substring(2);
|
||||
}
|
||||
if(src.Length == 6)
|
||||
{
|
||||
src = "20" + src.Substring(0, 2) + "-" + src.Substring(2, 2) + "-" + src.Substring(4, 2);
|
||||
}
|
||||
if(src.Length == 5 && src.Substring(2,1) == "-")
|
||||
{
|
||||
src = DateTime.Now.ToString("yyyy-") + src;
|
||||
}
|
||||
|
||||
if (DateTime.TryParse(src, out dt))
|
||||
{
|
||||
data = dt.ToShortDateString();
|
||||
return true;
|
||||
}
|
||||
else data = src;
|
||||
return false;
|
||||
}
|
||||
public static void SetFormStatus(ref System.Windows.Forms.Form f, string formid, Boolean read)
|
||||
{
|
||||
var fi = new System.IO.FileInfo(info.Path + "formSetting\\" + formid + ".xml");
|
||||
if (fi.Directory.Exists == false) fi.Directory.Create();
|
||||
arUtil.XMLHelper xml = new arUtil.XMLHelper(fi.FullName);
|
||||
if (!xml.Exist())
|
||||
{
|
||||
xml.CreateFile();
|
||||
if (read) return; //읽기인데 파일이 없으므로 넘어간다.
|
||||
}
|
||||
if (read)
|
||||
{
|
||||
var leftStr = xml.get_Data("position", "left");
|
||||
var topStr = xml.get_Data("position", "top");
|
||||
int l = 0;
|
||||
int t = 0;
|
||||
if (!int.TryParse(leftStr, out l)) l = 0;
|
||||
if (!int.TryParse(topStr, out t)) t = 0;
|
||||
if (l != 0 || t != 0)
|
||||
{
|
||||
f.Location = new System.Drawing.Point(l, t);
|
||||
}
|
||||
|
||||
var wStr = xml.get_Data("size", "width");
|
||||
var hStr = xml.get_Data("size", "height");
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
if (!int.TryParse(wStr, out w)) w = 0;
|
||||
if (!int.TryParse(hStr, out h)) h = 0;
|
||||
if (w != 0 || h != 0)
|
||||
{
|
||||
f.Size = new System.Drawing.Size(w, h);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
xml.set_Data("position", "left", f.Left.ToString());
|
||||
xml.set_Data("position", "top", f.Top.ToString());
|
||||
xml.set_Data("size", "width", f.Width.ToString());
|
||||
xml.set_Data("size", "height", f.Height.ToString());
|
||||
xml.Save();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//190806 chi getWorkWeek 추가
|
||||
//190805 chi MakeCSVString 추가
|
||||
//180903 chi makefilepath/ ftppath 추가
|
||||
//180807 chi rad2deg, deg2rad 추가
|
||||
//180625 chi ToCharHexString,ToStringFromHexString 추가
|
||||
//180624 chi isLocalApplication 추가
|
||||
//180618 chi GetCSVBuffer 추가
|
||||
//180614 chi map 명령어 추가
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static partial class Util
|
||||
{
|
||||
public static Boolean MakeDateString(string src, out string data)
|
||||
{
|
||||
data = src;
|
||||
string dtStr = string.Empty;
|
||||
DateTime dt;
|
||||
int iv;
|
||||
if (int.TryParse(src, out iv))
|
||||
{
|
||||
if (iv <= 31)
|
||||
{
|
||||
src = DateTime.Now.ToString("yyyy-MM-") + iv.ToString("00");
|
||||
}
|
||||
else if(src.Length <= 2)
|
||||
{
|
||||
//숫자이긴하나 32보다크면 오류로 한다.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
src = src.Replace("/", "-");
|
||||
if (src.Length < 4)
|
||||
{
|
||||
src = src.PadLeft(4, '0');
|
||||
}
|
||||
if(src.Length==4)
|
||||
{
|
||||
src = DateTime.Now.ToString("yyyy") + "-" + src.Substring(0, 2) + "-" + src.Substring(2);
|
||||
}
|
||||
if(src.Length == 6)
|
||||
{
|
||||
src = "20" + src.Substring(0, 2) + "-" + src.Substring(2, 2) + "-" + src.Substring(4, 2);
|
||||
}
|
||||
if(src.Length == 5 && src.Substring(2,1) == "-")
|
||||
{
|
||||
src = DateTime.Now.ToString("yyyy-") + src;
|
||||
}
|
||||
|
||||
if (DateTime.TryParse(src, out dt))
|
||||
{
|
||||
data = dt.ToShortDateString();
|
||||
return true;
|
||||
}
|
||||
else data = src;
|
||||
return false;
|
||||
}
|
||||
public static void SetFormStatus(ref System.Windows.Forms.Form f, string formid, Boolean read)
|
||||
{
|
||||
var fi = new System.IO.FileInfo(info.Path + "formSetting\\" + formid + ".xml");
|
||||
if (fi.Directory.Exists == false) fi.Directory.Create();
|
||||
arUtil.XMLHelper xml = new arUtil.XMLHelper(fi.FullName);
|
||||
if (!xml.Exist())
|
||||
{
|
||||
xml.CreateFile();
|
||||
if (read) return; //읽기인데 파일이 없으므로 넘어간다.
|
||||
}
|
||||
if (read)
|
||||
{
|
||||
var leftStr = xml.get_Data("position", "left");
|
||||
var topStr = xml.get_Data("position", "top");
|
||||
int l = 0;
|
||||
int t = 0;
|
||||
if (!int.TryParse(leftStr, out l)) l = 0;
|
||||
if (!int.TryParse(topStr, out t)) t = 0;
|
||||
if (l != 0 || t != 0)
|
||||
{
|
||||
f.Location = new System.Drawing.Point(l, t);
|
||||
}
|
||||
|
||||
var wStr = xml.get_Data("size", "width");
|
||||
var hStr = xml.get_Data("size", "height");
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
if (!int.TryParse(wStr, out w)) w = 0;
|
||||
if (!int.TryParse(hStr, out h)) h = 0;
|
||||
if (w != 0 || h != 0)
|
||||
{
|
||||
f.Size = new System.Drawing.Size(w, h);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
xml.set_Data("position", "left", f.Left.ToString());
|
||||
xml.set_Data("position", "top", f.Top.ToString());
|
||||
xml.set_Data("size", "width", f.Width.ToString());
|
||||
xml.set_Data("size", "height", f.Height.ToString());
|
||||
xml.Save();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
//190806 chi getWorkWeek 추가
|
||||
//190805 chi MakeCSVString 추가
|
||||
//180903 chi makefilepath/ ftppath 추가
|
||||
//180807 chi rad2deg, deg2rad 추가
|
||||
//180625 chi ToCharHexString,ToStringFromHexString 추가
|
||||
//180624 chi isLocalApplication 추가
|
||||
//180618 chi GetCSVBuffer 추가
|
||||
//180614 chi map 명령어 추가
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static class info
|
||||
{
|
||||
public struct sUserInfo
|
||||
{
|
||||
public string title;
|
||||
public string tel;
|
||||
public string hp;
|
||||
public string no;
|
||||
public string nameE;
|
||||
public string ShortID;
|
||||
public string nameK;
|
||||
public string dept;
|
||||
public string email;
|
||||
public int level;
|
||||
}
|
||||
|
||||
public static sUserInfo Login;
|
||||
public static string Path;
|
||||
public static string CS;
|
||||
public static string libxlCompany = "Amkor Technology korea, Inc";
|
||||
public static string libxlKey = "windows-282b2b0800c5e0016bb06a6fafjfd6o8";
|
||||
}
|
||||
}
|
||||
//190806 chi getWorkWeek 추가
|
||||
//190805 chi MakeCSVString 추가
|
||||
//180903 chi makefilepath/ ftppath 추가
|
||||
//180807 chi rad2deg, deg2rad 추가
|
||||
//180625 chi ToCharHexString,ToStringFromHexString 추가
|
||||
//180624 chi isLocalApplication 추가
|
||||
//180618 chi GetCSVBuffer 추가
|
||||
//180614 chi map 명령어 추가
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static class info
|
||||
{
|
||||
public struct sUserInfo
|
||||
{
|
||||
public string title;
|
||||
public string tel;
|
||||
public string hp;
|
||||
public string no;
|
||||
public string nameE;
|
||||
public string ShortID;
|
||||
public string nameK;
|
||||
public string dept;
|
||||
public string email;
|
||||
public int level;
|
||||
}
|
||||
|
||||
public static sUserInfo Login;
|
||||
public static string Path;
|
||||
public static string CS;
|
||||
public static string libxlCompany = "Amkor Technology korea, Inc";
|
||||
public static string libxlKey = "windows-282b2b0800c5e0016bb06a6fafjfd6o8";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 어셈블리의 일반 정보는 다음 특성 집합을 통해 제어됩니다.
|
||||
// 어셈블리와 관련된 정보를 수정하려면
|
||||
// 이 특성 값을 변경하십시오.
|
||||
[assembly: AssemblyTitle("FCOMMON")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("FCOMMON")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
||||
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
|
||||
// 해당 형식에 대해 ComVisible 특성을 true로 설정하십시오.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||
[assembly: Guid("1aab0704-afb9-497e-8b60-f90ba210f307")]
|
||||
|
||||
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
|
||||
//
|
||||
// 주 버전
|
||||
// 부 버전
|
||||
// 빌드 번호
|
||||
// 수정 버전
|
||||
//
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 버전이 자동으로
|
||||
// 지정되도록 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 어셈블리의 일반 정보는 다음 특성 집합을 통해 제어됩니다.
|
||||
// 어셈블리와 관련된 정보를 수정하려면
|
||||
// 이 특성 값을 변경하십시오.
|
||||
[assembly: AssemblyTitle("FCOMMON")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("FCOMMON")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
||||
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
|
||||
// 해당 형식에 대해 ComVisible 특성을 true로 설정하십시오.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||
[assembly: Guid("1aab0704-afb9-497e-8b60-f90ba210f307")]
|
||||
|
||||
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
|
||||
//
|
||||
// 주 버전
|
||||
// 부 버전
|
||||
// 빌드 번호
|
||||
// 수정 버전
|
||||
//
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 버전이 자동으로
|
||||
// 지정되도록 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
1
SubProject/FCOMMON/Properties/licenses.licx
Normal file
1
SubProject/FCOMMON/Properties/licenses.licx
Normal file
@@ -0,0 +1 @@
|
||||
FarPoint.Win.Spread.FpSpread, FarPoint.Win.Spread, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457
|
||||
File diff suppressed because it is too large
Load Diff
43
SubProject/FCOMMON/Util_Farpoint.cs
Normal file
43
SubProject/FCOMMON/Util_Farpoint.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static partial class Util
|
||||
{
|
||||
public static void FPColSizeAuto(FarPoint.Win.Spread.FpSpread fp)
|
||||
{
|
||||
fp.ActiveSheet.DataAutoSizeColumns = true;
|
||||
for (int i = 0; i < fp.ActiveSheet.Rows.Count; i++)
|
||||
fp.ActiveSheet.SetRowHeight(i, 25);
|
||||
}
|
||||
public static void FPCollSizeReset(FarPoint.Win.Spread.FpSpread fp)
|
||||
{
|
||||
foreach (FarPoint.Win.Spread.Column col in fp.ActiveSheet.Columns)
|
||||
{
|
||||
col.Width = 100;
|
||||
}
|
||||
}
|
||||
|
||||
public static void FPColsizeSave(FarPoint.Win.Spread.FpSpread dv, string fn)
|
||||
{
|
||||
arUtil.INIHelper ini = new arUtil.INIHelper(fn);
|
||||
foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns)
|
||||
ini.set_Data("colsize", "index_" + col.Index.ToString(), col.Width.ToString());
|
||||
ini.Flush();
|
||||
}
|
||||
public static void FPColSizeLoad(ref FarPoint.Win.Spread.FpSpread dv, string fn)
|
||||
{
|
||||
if (System.IO.File.Exists(fn) == false) return;
|
||||
arUtil.INIHelper ini = new arUtil.INIHelper(fn);
|
||||
foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns)
|
||||
{
|
||||
var width = ini.get_Data("colsize", "index_" + col.Index.ToString(), "0");
|
||||
col.Width = float.Parse(width);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
96
SubProject/FCOMMON/fBase.Designer.cs
generated
96
SubProject/FCOMMON/fBase.Designer.cs
generated
@@ -1,49 +1,49 @@
|
||||
namespace FCOMMON
|
||||
{
|
||||
partial class fBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// fBase
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(448, 349);
|
||||
this.KeyPreview = true;
|
||||
this.Name = "fBase";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "fBase";
|
||||
this.Load += new System.EventHandler(this.fBase_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
namespace FCOMMON
|
||||
{
|
||||
partial class fBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// fBase
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(448, 349);
|
||||
this.KeyPreview = true;
|
||||
this.Name = "fBase";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "fBase";
|
||||
this.Load += new System.EventHandler(this.fBase_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,48 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public partial class fBase : Form
|
||||
{
|
||||
public Boolean UseFormSetting { get; set; }
|
||||
public fBase()
|
||||
{
|
||||
InitializeComponent();
|
||||
UseFormSetting = true;
|
||||
this.FormClosed += fBase_FormClosed;
|
||||
this.KeyDown += fBase_KeyDown;
|
||||
}
|
||||
|
||||
void fBase_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape) this.Close();
|
||||
}
|
||||
|
||||
void fBase_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
if(UseFormSetting)
|
||||
{
|
||||
var form = this as Form;
|
||||
FCOMMON.Util.SetFormStatus(ref form, this.Name, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void fBase_Load(object sender, EventArgs e)
|
||||
{
|
||||
if(UseFormSetting)
|
||||
{
|
||||
var form = this as Form;
|
||||
FCOMMON.Util.SetFormStatus(ref form, this.Name, true);
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public partial class fBase : Form
|
||||
{
|
||||
public Boolean UseFormSetting { get; set; }
|
||||
public fBase()
|
||||
{
|
||||
InitializeComponent();
|
||||
UseFormSetting = true;
|
||||
this.FormClosed += fBase_FormClosed;
|
||||
this.KeyDown += fBase_KeyDown;
|
||||
}
|
||||
|
||||
void fBase_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape) this.Close();
|
||||
}
|
||||
|
||||
void fBase_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
if(UseFormSetting)
|
||||
{
|
||||
var form = this as Form;
|
||||
FCOMMON.Util.SetFormStatus(ref form, this.Name, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void fBase_Load(object sender, EventArgs e)
|
||||
{
|
||||
if(UseFormSetting)
|
||||
{
|
||||
var form = this as Form;
|
||||
FCOMMON.Util.SetFormStatus(ref form, this.Name, true);
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,120 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
132
SubProject/FCOMMON/fLovDateList.Designer.cs
generated
132
SubProject/FCOMMON/fLovDateList.Designer.cs
generated
@@ -1,67 +1,67 @@
|
||||
namespace FCOMMON
|
||||
{
|
||||
partial class fLovDateList
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listBox1.Font = new System.Drawing.Font("Tahoma", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.listBox1.FormattingEnabled = true;
|
||||
this.listBox1.ItemHeight = 33;
|
||||
this.listBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(303, 445);
|
||||
this.listBox1.TabIndex = 0;
|
||||
this.listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick);
|
||||
this.listBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listBox1_KeyDown);
|
||||
//
|
||||
// fLovDateList
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(303, 445);
|
||||
this.Controls.Add(this.listBox1);
|
||||
this.Font = new System.Drawing.Font("Tahoma", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "fLovDateList";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "fLovDateList";
|
||||
this.Load += new System.EventHandler(this.@__Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListBox listBox1;
|
||||
}
|
||||
namespace FCOMMON
|
||||
{
|
||||
partial class fLovDateList
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listBox1.Font = new System.Drawing.Font("Tahoma", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.listBox1.FormattingEnabled = true;
|
||||
this.listBox1.ItemHeight = 33;
|
||||
this.listBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(303, 445);
|
||||
this.listBox1.TabIndex = 0;
|
||||
this.listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick);
|
||||
this.listBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listBox1_KeyDown);
|
||||
//
|
||||
// fLovDateList
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(303, 445);
|
||||
this.Controls.Add(this.listBox1);
|
||||
this.Font = new System.Drawing.Font("Tahoma", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "fLovDateList";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "fLovDateList";
|
||||
this.Load += new System.EventHandler(this.@__Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListBox listBox1;
|
||||
}
|
||||
}
|
||||
@@ -1,55 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public partial class fLovDateList : Form
|
||||
{
|
||||
public string selectedDate = string.Empty;
|
||||
public fLovDateList(List<string> dateList)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.KeyPreview = true;
|
||||
this.KeyDown += fLovDateList_KeyDown;
|
||||
|
||||
this.listBox1.Items.Clear();
|
||||
foreach (var dateStr in dateList)
|
||||
this.listBox1.Items.Add(dateStr);
|
||||
}
|
||||
private void __Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
void fLovDateList_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape) this.Close();
|
||||
}
|
||||
void selectItem()
|
||||
{
|
||||
selectedDate = string.Empty;
|
||||
if (listBox1.Items.Count < 1) DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
if (listBox1.SelectedItem == null) DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.selectedDate = listBox1.SelectedItem.ToString();
|
||||
DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
}
|
||||
|
||||
private void listBox1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
selectItem();
|
||||
}
|
||||
|
||||
private void listBox1_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
selectItem();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public partial class fLovDateList : Form
|
||||
{
|
||||
public string selectedDate = string.Empty;
|
||||
public fLovDateList(List<string> dateList)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.KeyPreview = true;
|
||||
this.KeyDown += fLovDateList_KeyDown;
|
||||
|
||||
this.listBox1.Items.Clear();
|
||||
foreach (var dateStr in dateList)
|
||||
this.listBox1.Items.Add(dateStr);
|
||||
}
|
||||
private void __Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
void fLovDateList_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape) this.Close();
|
||||
}
|
||||
void selectItem()
|
||||
{
|
||||
selectedDate = string.Empty;
|
||||
if (listBox1.Items.Count < 1) DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
if (listBox1.SelectedItem == null) DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.selectedDate = listBox1.SelectedItem.ToString();
|
||||
DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
}
|
||||
|
||||
private void listBox1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
selectItem();
|
||||
}
|
||||
|
||||
private void listBox1_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
selectItem();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,120 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,33 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
|
||||
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