Exemplo n.º 1
0
 internal string SetCommonSettings(CommonSettings commonSettings,bool Exist)
 {
     string val = JsonConvert.SerializeObject(commonSettings);
     if (Exist)
     {
         return string.Format("update commonsetting set jsonsettinginfodata='{0}'", val);
     }
     else
     {
         return string.Format("insert into commonsetting(jsonsettinginfodata) values('{0}')", val);
     }
 }
Exemplo n.º 2
0
 public int SetCommonSettingInfo(string AuthKey, string serviceURL, CommonSettings CommonSettings)
 {
     if (!securityManager.CheckSecurityToken(AuthKey))
     {
         throw new Exception("인증된 사용자가 아닙니다");
     }
     //기존 정보가 있는지 검증
     bool Exist = false;
     DataTable dt = DBController.getInstance().GetData(serviceURL, new CommonSettingsQuery().GetCommonSettings());
     if (dt != null && dt.Rows.Count > 0)
     {
         Exist = true;
     }
     string Query = new CommonSettingsQuery().SetCommonSettings(CommonSettings, Exist);
     return DBController.getInstance().SetData(serviceURL, Query);
 }