초기 커밋.
This commit is contained in:
63
ssgrestserver/request/웹핸들링/입력/AInputTextHandler.cs
Normal file
63
ssgrestserver/request/웹핸들링/입력/AInputTextHandler.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
abstract class AInputTextHandler : ARequestObject
|
||||
{
|
||||
|
||||
protected string updateTextName = "";
|
||||
|
||||
protected abstract void setUpdateData();
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
this.setUpdateData();
|
||||
|
||||
if (!mRequestParameterKVPairList.ContainsKey("보낸사람"))
|
||||
{
|
||||
return "없는데이터 - 보낸사람";
|
||||
}
|
||||
if (!mRequestParameterKVPairList.ContainsKey(updateTextName))
|
||||
{
|
||||
return "없는데이터 - " + updateTextName;
|
||||
}
|
||||
|
||||
코더확인객채생성여부();
|
||||
|
||||
JObject bufObj = new JObject();
|
||||
|
||||
bufObj.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
bufObj.Add(updateTextName, mRequestParameterKVPairList[updateTextName]);
|
||||
|
||||
bufObj.Add("입력시간", DateTime.Now.ToString());
|
||||
|
||||
if (mAccessableDictionary.ContainsKey(m채널이름))
|
||||
{
|
||||
mAccessableDictionary[m채널이름] = bufObj;
|
||||
}
|
||||
else
|
||||
{
|
||||
mAccessableDictionary.Add(m채널이름, bufObj);
|
||||
}
|
||||
|
||||
|
||||
JObject retObj = new JObject();
|
||||
|
||||
|
||||
foreach (var item in mAccessableDictionary[m채널이름])
|
||||
{
|
||||
retObj.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
retObj.Add("status", "200");
|
||||
|
||||
return retObj.ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user