public MyCompany GetMyCompanyInfo(string AuthKey, string serviceURL) { if (!securityManager.CheckSecurityToken(AuthKey)) { throw new Exception("인증된 사용자가 아닙니다"); } String Query = new MyCompanyQuery().GetMyCompanyInfo(); DataTable dt = DBController.getInstance().GetData(serviceURL, Query); MyCompany my_company = JsonConvert.DeserializeObject <MyCompany>(dt.Rows[0]["jsonmyinfo"].ToString()); return(my_company); }
public int SetMyCompanyInfo(string AuthKey, string serviceURL, MyCompany myCompanyInfo) { if (!securityManager.CheckSecurityToken(AuthKey)) { throw new Exception("인증된 사용자가 아닙니다"); } //기존 정보가 있는지 검증 bool Exist = false; DataTable dt = DBController.getInstance().GetData(serviceURL, new MyCompanyQuery().GetMyCompanyInfo()); if (dt != null && dt.Rows.Count > 0) { Exist = true; } string Query = new MyCompanyQuery().SetMyCompanyInfo(myCompanyInfo, Exist); return(DBController.getInstance().SetData(serviceURL, Query)); }