public static string ParseImpl(PageInfo pageInfo, ContextInfo contextInfo, string styleName, string successTemplateString, string failureTemplateString) { pageInfo.AddPageScriptsIfNotExists(PageInfo.Components.Jquery); pageInfo.AddPageScriptsIfNotExists(PageInfo.JQuery.BAjaxUpload); pageInfo.AddPageScriptsIfNotExists(PageInfo.JQuery.BQueryString); pageInfo.AddPageScriptsIfNotExists(PageInfo.JQuery.BValidate); pageInfo.AddPageScriptsIfNotExists(PageInfo.JsInnerCalendar); var resumeTemplate = new ResumeTemplate(pageInfo.PublishmentSystemInfo); var parsedContent = resumeTemplate.GetTemplate(successTemplateString, failureTemplateString); return(parsedContent); }
public static string ParseImpl(PageInfo pageInfo, ContextInfo contextInfo, string styleName, string yes, string no) { pageInfo.AddPageScriptsIfNotExists(PageInfo.Components.Jquery); pageInfo.AddPageScriptsIfNotExists(PageInfo.JQuery.BAjaxUpload); pageInfo.AddPageScriptsIfNotExists(PageInfo.JQuery.BQueryString); pageInfo.AddPageScriptsIfNotExists(PageInfo.JQuery.BValidate); pageInfo.AddPageScriptsIfNotExists(PageInfo.JsInnerCalendar); yes = StlParserManager.ParseInnerContent(yes, pageInfo, contextInfo); no = StlParserManager.ParseInnerContent(no, pageInfo, contextInfo); var resumeTemplate = new ResumeTemplate(pageInfo.PublishmentSystemInfo); var parsedContent = resumeTemplate.GetTemplate(yes, no); return(parsedContent); }
public void Main(int publishmentSystemId) { var publishmentSystemInfo = PublishmentSystemManager.GetPublishmentSystemInfo(publishmentSystemId); try { var contentInfo = DataProvider.ResumeContentDao.GetContentInfo(publishmentSystemId, HttpContext.Current.Request.Form); DataProvider.ResumeContentDao.Insert(contentInfo); string message; if (string.IsNullOrEmpty(HttpContext.Current.Request.Form["successTemplateString"])) { message = "简历添加成功。"; } else { message = TranslateUtils.DecryptStringBySecretKey(HttpContext.Current.Request.Form["successTemplateString"]); } HttpContext.Current.Response.Write(ResumeTemplate.GetCallbackScript(publishmentSystemInfo, true, message)); HttpContext.Current.Response.End(); } catch (Exception ex) { string message; if (string.IsNullOrEmpty(HttpContext.Current.Request.Form["failureTemplateString"])) { //message = "简历添加失败," + ex.Message; message = "简历添加失败,程序出错。"; } else { message = TranslateUtils.DecryptStringBySecretKey(HttpContext.Current.Request.Form["failureTemplateString"]); } HttpContext.Current.Response.Write(ResumeTemplate.GetCallbackScript(publishmentSystemInfo, false, message)); HttpContext.Current.Response.End(); } }