반환 데이터 서버와 클라이언트로 나누기
This commit is contained in:
parent
c33e0240f6
commit
c7b6eaa106
|
|
@ -10,15 +10,18 @@ namespace Server.Git
|
||||||
public string name { get { return _name; } }
|
public string name { get { return _name; } }
|
||||||
List<string> _variable;
|
List<string> _variable;
|
||||||
public List<string> variable { get { return _variable; } }
|
public List<string> variable { get { return _variable; } }
|
||||||
|
List<string> _dataEnum;
|
||||||
|
public List<string> dataEnum { get { return _dataEnum; } }
|
||||||
List<string> _type;
|
List<string> _type;
|
||||||
public List<string> type { get { return _type; } }
|
public List<string> type { get { return _type; } }
|
||||||
Dictionary<long, Dictionary<string, object>> _dicViewer;
|
Dictionary<long, Dictionary<string, object>> _dicViewer;
|
||||||
public Dictionary<long, Dictionary<string, object>> dicViewer { get { return _dicViewer; } }
|
public Dictionary<long, Dictionary<string, object>> dicViewer { get { return _dicViewer; } }
|
||||||
|
|
||||||
public sheet(string name, List<string> variable, List<string> type, Dictionary<long, Dictionary<string, object>> dicViewer)
|
public sheet(string name, List<string> variable, List<string> dataEnum, List<string> type, Dictionary<long, Dictionary<string, object>> dicViewer)
|
||||||
{
|
{
|
||||||
this._name = name;
|
this._name = name;
|
||||||
this._variable = variable;
|
this._variable = variable;
|
||||||
|
this._dataEnum = dataEnum;
|
||||||
this._type = type;
|
this._type = type;
|
||||||
this._dicViewer = dicViewer;
|
this._dicViewer = dicViewer;
|
||||||
}
|
}
|
||||||
|
|
@ -61,6 +64,8 @@ namespace Server.Git
|
||||||
{
|
{
|
||||||
//변수이름
|
//변수이름
|
||||||
List<string> variable = new List<string>();
|
List<string> variable = new List<string>();
|
||||||
|
//서버용인지 클라용인지 나뉘는 타입
|
||||||
|
List<string> dataEnum = new List<string>();
|
||||||
//변수 타입
|
//변수 타입
|
||||||
List<string> type = new List<string>();
|
List<string> type = new List<string>();
|
||||||
Dictionary<long, Dictionary<string, object>> dicViewer = new Dictionary<long, Dictionary<string, object>>();
|
Dictionary<long, Dictionary<string, object>> dicViewer = new Dictionary<long, Dictionary<string, object>>();
|
||||||
|
|
@ -76,7 +81,8 @@ namespace Server.Git
|
||||||
for (int n = 0; n <= horizontal; n++)
|
for (int n = 0; n <= horizontal; n++)
|
||||||
{
|
{
|
||||||
variable.Add((string)worksheet.Cells[0, n].Value);
|
variable.Add((string)worksheet.Cells[0, n].Value);
|
||||||
type.Add(((string)worksheet.Cells[2, n].Value).ToLower());
|
type.Add(((string)worksheet.Cells[3, n].Value).ToLower());
|
||||||
|
dataEnum.Add(((string)worksheet.Cells[2, n].Value).ToLower());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isIndex = variable[0] == "index";
|
bool isIndex = variable[0] == "index";
|
||||||
|
|
@ -90,7 +96,7 @@ namespace Server.Git
|
||||||
}
|
}
|
||||||
dicViewer.Add((int)(isIndex ? worksheet.Cells[n, 0].Value : n - 3), dataList);
|
dicViewer.Add((int)(isIndex ? worksheet.Cells[n, 0].Value : n - 3), dataList);
|
||||||
}
|
}
|
||||||
sheet sheet = new sheet(worksheet.Name, variable, type, dicViewer);
|
sheet sheet = new sheet(worksheet.Name, variable, dataEnum, type, dicViewer);
|
||||||
_sheets.Add(sheet);
|
_sheets.Add(sheet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,9 @@ namespace Server.Git
|
||||||
query = "";
|
query = "";
|
||||||
for (int n = 0; n < sheets.Count; n++)
|
for (int n = 0; n < sheets.Count; n++)
|
||||||
{
|
{
|
||||||
|
if (sheets[n].dataEnum[0] == "client")
|
||||||
|
continue;
|
||||||
|
|
||||||
//초기화
|
//초기화
|
||||||
newTableQuery = "";
|
newTableQuery = "";
|
||||||
tableDatas = "(";
|
tableDatas = "(";
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ namespace Server.Git
|
||||||
sheets = em.sheets;
|
sheets = em.sheets;
|
||||||
for (int m = 0; m < sheets.Count; m++)
|
for (int m = 0; m < sheets.Count; m++)
|
||||||
{
|
{
|
||||||
|
if (sheets[m].dataEnum[0] == "server")
|
||||||
|
continue;
|
||||||
sheetList.Add(sheets[m].name, sheets[m].dicViewer);
|
sheetList.Add(sheets[m].name, sheets[m].dicViewer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ namespace Server.Service
|
||||||
user = new User();
|
user = new User();
|
||||||
user.mail = req.mail;
|
user.mail = req.mail;
|
||||||
user.uuid = Guid.NewGuid().ToString();
|
user.uuid = Guid.NewGuid().ToString();
|
||||||
user.nickname = "";
|
user.nickname = "NoName";
|
||||||
userSql.Insert(user); //저장하고 유닛의 id를 얻어오기 위함.
|
userSql.Insert(user); //저장하고 유닛의 id를 얻어오기 위함.
|
||||||
#endregion
|
#endregion
|
||||||
#region 초기 유닛 지급
|
#region 초기 유닛 지급
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue