//保存模板 //参数1:模板ID public ReturnValue saveView(double id, double classId, int u_viewType, string title, string u_html, int u_editboxStatus, double u_datatypeId, string u_parameterValue) { try { ReturnValue info = new ReturnValue(); if (!loginInfo.value.isAdministrator) { info.errNo = -1; info.errMsg = "没有权限"; return(info); } ViewTemplate viewTemplate = new ViewTemplate() { TemplateId = id, ColumnId = classId, ViewType = u_viewType, TemplateName = title, TemplateContent = u_html, EditMode = (EditMode)u_editboxStatus, DatatypeId = u_datatypeId, ParameterValue = u_parameterValue }; viewTemplate.Save(loginInfo.value.username); info.userData = viewTemplate.TemplateId; return(info); } catch (Exception e) { return(ReturnValue.Err(e.Message)); } }