Beispiel #1
0
 /// <summary>
 /// Export 사이트 저장
 /// </summary>
 /// <param name="site">Export 사이트 class</param>
 public void ExportSiteSave(ExportSite site)
 {
     GEPMongoDacHelper MongoHelper = new GEPMongoDacHelper("gep", "export_site");
     MongoHelper.Save<ExportSite>(site);
 }
Beispiel #2
0
 /// <summary>
 /// Export 사이트 생성
 /// </summary>
 /// <param name="site">Export 사이트 class</param>
 public void ExportSiteCreate(ExportSite site)
 {
     GEPMongoDacHelper MongoHelper = new GEPMongoDacHelper("gep", "export_site");
     MongoHelper.Insert<ExportSite>(site);
 }
Beispiel #3
0
        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;
        }