public GepAdminResult AdminIpDelete(string id) { GepAdminResult resultData = new GepAdminResult(); try { new AdminDac().AccessIPRemove(ObjectId.Parse(id)); resultData.result = "S"; } catch (Exception ex) { resultData.message = ex.Message; resultData.result = "F"; } return resultData; }
public GepAdminResult AdminIpInsert(string ip1, string ip2, string ip3, string ip4, string name, string grade, string email, string use, string loginId) { GepAdminResult resultData = new GepAdminResult(); try { AccessIP data = new AccessIP(); data.ip = string.Format("{0}.{1}.{2}.{3}", ip1, ip2, ip3, ip4); data.name = name; data.email = email; data.grade = grade; data.is_use = use == "Y" ? true : false; data.r_id = loginId; data.rdate = DateTime.Now; new AdminDac().AccessIPCreate(data); resultData.result = "S"; } catch (Exception ex) { resultData.message = ex.Message; resultData.result = "F"; } return resultData; }
public GepAdminResult TaUserEdit(string id, string gmkt_id) { GepAdminResult resultData = new GepAdminResult(); try { TaInfo tainfo = new TaInfoDac().TaUserView(ObjectId.Parse(id)); tainfo.gmkt_id = gmkt_id; new TaInfoDac().TaUserSave(tainfo); resultData.result = "S"; } catch (Exception ex) { resultData.message = ex.Message; resultData.result = "F"; } return resultData; }
public GepAdminResult TaUserCreate(string id) { GepAdminResult resultData = new GepAdminResult(); try { TaInfo tainfo = new TaInfo(); tainfo._id = ObjectId.GenerateNewId(); tainfo.gmkt_id = id; tainfo.rdate = DateTime.Now; new TaInfoDac().TaUserCreate(tainfo); resultData.result = "S"; } catch (Exception ex) { resultData.message = ex.Message; resultData.result = "F"; } return resultData; }
public GepAdminResult TaUpsert(string gmktId, string engName, string engAddress, string firstTel1, string firstTel2, string firstTel3, string firstTel4, string secondTel1, string secondTel2, string secondTel3, string secondTel4) { GepAdminResult resultData = new GepAdminResult(); try { new TaInfoDac().TaUpdateInfo(gmktId, engName, engAddress, firstTel1, firstTel2, firstTel3, firstTel4, secondTel1, secondTel2, secondTel3, secondTel4); resultData.result = "S"; } catch (Exception e) { resultData.message = e.Message; resultData.result = "F"; } return resultData; }
public GepAdminResult SourceSiteUseChange(string siteId, string siteName, string useYn, string loginId) { GepAdminResult resultData = new GepAdminResult(); try { SourceSite data = new AdminDac().SourceSiteView(ObjectId.Parse(siteId)); data.site_name = siteName; data.use_yn = useYn == "Y" ? true : false; data.modify_date = DateTime.Now; data.modify_id = loginId; new AdminDac().SourceSiteSave(data); resultData.result = "S"; } catch (Exception ex) { resultData.message = ex.Message; resultData.result = "F"; } return resultData; }
public GepAdminResult SourceSiteDelete(string siteId) { GepAdminResult resultData = new GepAdminResult(); try { new AdminDac().SourceSiteRemove(ObjectId.Parse(siteId)); resultData.result = "S"; } catch (Exception ex) { resultData.message = ex.Message; resultData.result = "F"; } return resultData; }
public GepAdminResult SourceSiteAdd(string siteName, string use, string loginId) { GepAdminResult resultData = new GepAdminResult(); try { SourceSite data = new SourceSite(); data.siteid = ObjectId.GenerateNewId(); data.site_name = siteName; data.use_yn = use == "Y" ? true : false; data.reg_id = loginId; data.reg_date = DateTime.Now; new AdminDac().SourceSiteCreate(data); resultData.result = "S"; } catch (Exception ex) { resultData.message = ex.Message; resultData.result = "F"; } return resultData; }
public GepAdminResult ExportSiteDelete(string siteId, string secondId) { GepAdminResult resultData = new GepAdminResult(); try { ExportSite originSite = new AdminDac().ExportSiteView(Query.EQ("_id", Util.GetSafeLong(siteId))); List<ExportSecondSite> secondList = new List<ExportSecondSite>(); foreach (var data in originSite.second_site) { if (data.second_siteId != Util.GetSafeInt(secondId)) { ExportSecondSite second = new ExportSecondSite(); second.second_siteId = data.second_siteId; second.second_site_name = data.second_site_name; second.lang = data.lang; secondList.Add(second); } } originSite.second_site = secondList; new AdminDac().ExportSiteSave(originSite); resultData.result = "S"; } catch (Exception ex) { resultData.message = ex.Message; resultData.result = "F"; } return resultData; }
public GepAdminResult ExportSiteAdd(string siteId, string siteName, string second_siteId, string second_siteName, string lang, string use, string loginId) { GepAdminResult resultData = new GepAdminResult(); try { ExportSite data = new ExportSite(); List<ExportSecondSite> secondSiteInfoList = new List<ExportSecondSite>(); // siteId로 찾기 if (siteId != "") { QueryComplete param = Query.EQ("_id", Util.GetSafeLong(siteId)); ExportSite originSite = new AdminDac().ExportSiteView(param); ExportSecondSite secondSiteInfo = new ExportSecondSite(); secondSiteInfo.second_siteId = Util.GetSafeInt(second_siteId); secondSiteInfo.second_site_name = second_siteName; secondSiteInfo.lang = lang; secondSiteInfo.use_yn = use == "Y" ? true : false; originSite.second_site.Add(secondSiteInfo); data = originSite; new AdminDac().ExportSiteSave(data); } else { data._id = GetExpertsiteNo(); data.site_name = siteName; ExportSecondSite secondSiteInfo = new ExportSecondSite(); secondSiteInfo.second_siteId = Util.GetSafeInt(second_siteId); secondSiteInfo.second_site_name = second_siteName; secondSiteInfo.lang = lang; secondSiteInfo.use_yn = use == "Y" ? true : false; secondSiteInfoList.Add(secondSiteInfo); data.second_site = secondSiteInfoList; data.reg_id = loginId; data.reg_date = DateTime.Now; new AdminDac().ExportSiteCreate(data); } resultData.result = "S"; } catch (Exception ex) { resultData.message = ex.Message; resultData.result = "F"; } return resultData; }