/// <summary> /// 保存表单(新增、修改) /// </summary> /// <param name="keyValue">主键值</param> /// <param name="entity">实体对象</param> /// <returns></returns> public void SaveForm(string keyValue, AppProjectModel entity) { try { AppProjectEntity appProjectEntity = new AppProjectEntity(); appProjectEntity.F_Name = entity.F_Name; appProjectEntity.F_Icon = entity.F_Icon; appProjectEntity.F_IsTabed = entity.F_IsTabed; service.SaveProject(keyValue, appProjectEntity, entity.F_Templates); } catch (Exception) { throw; } }
public ActionResult DownForm(string keyValue, AppProjectModel entity) { string OutputDirectory = Server.MapPath("~/Web.config");; for (int i = 0; i < 2; i++) { OutputDirectory = OutputDirectory.Substring(0, OutputDirectory.LastIndexOf('\\')); } string fileName = entity.F_Name + DateTime.Now.ToString("yyyyMMddHHmmssffff"); string res = appprojectbll.DownForm(keyValue, entity, OutputDirectory + "\\AppBuildPath\\" + fileName); var data = new { path = fileName }; return(ToJsonResult(data)); }
/// <summary> /// 下载app设计 /// </summary> /// <param name="keyValue"></param> /// <param name="entity"></param> public string DownForm(string keyValue, AppProjectModel entity, string outputDirectory) { try { AppProjectEntity appProjectEntity = new AppProjectEntity(); appProjectEntity.F_Name = entity.F_Name; appProjectEntity.F_Icon = entity.F_Icon; appProjectEntity.F_IsTabed = entity.F_IsTabed; //service.SaveProject(keyValue, appProjectEntity, entity.F_Templates); return(webappTemplate.AppBuilder(entity.F_Templates, appProjectEntity, outputDirectory)); } catch (Exception) { throw; } }
public ActionResult SaveForm(string keyValue, AppProjectModel entity) { appprojectbll.SaveForm(keyValue, entity); return(Success("操作成功。")); }