如何发布打印模板补丁?

by RainBirda 2015.7.14 11:31
注:脚本执行有风险,对于客户正式环境请在研发指导下执行。   发布元数据   1、打开打印模型元数据管理  2、选中要导出元数据文件夹,右键       3、选择保存的位置         4、将生成的xml文件放到ReportMD目录,并签入到CC中       发布参照   1、打开打印参照的窗口       2、生成打印参照脚本       3、将生成的SQL脚本放到PostSqL目录中,并迁入CC     

客开直接指定加载特定的个性化模板的方法

by lkc 2014.5.12 15:17
注:脚本执行有风险,对于客户正式环境请在研发指导下执行。一、问题邮件          原来在pmp平台提过一个问题,即如何为单据档案加载指定的个性化模板,当时你提供的解决方案是:          客开可以指定 主页面的SpecialTemplateID属性 设置客开加载的某个固定的个性化模板 代码类似: ((WebPartBase)part).SpecialTemplateID = "XXXXXXXX"; 其中的part是弹出的SO 等号右边是一个guid的个性化模板ID 查看个性化模板ID的方法: 从菜单进入销售订单(如果存在多个个性化模板 需要操作界面的触发控件 使得界面加载到某个特定的模板——即个性化模板管控功能) 修改地址栏中的erp\display为errors\pdisplay 点击查看模型 在个性化模型的最下方找到当前编辑的个性化模板ID 类似于<EditTemplateID>c560c257-2e32-48d7-9637-188893161307       现在的问题是SpecialTemplateID属性为只读属性,无法赋值。是否还能通过其他方式进行传递?要在插件中的哪个事件进行指定呢? 二、解决方案  给UFSoft.UBF.UI.Portal.WebControls.WebParts.WebPartBase中的属性FirstTemplateID赋值需要加载的个性化模板ID即可 三、源代码         public string FirstTemplateID        {            set            {                if (!string.IsNullOrEmpty(value))                    this._specialTemplateID = value;            }        }         public string SpecialTemplateID        {            //校验ID是否有效:是否存在于当前模板里。            get            {                //简单缓存                if (this._specialTemplateID.Length == 0)                {                    string tmp = this.Page.Request.Params[SpecialTemplateID_KEY];                    if (!string.IsNullOrEmpty(tmp))                    {                        if ((AllVersionAdjustModel != null) && (AllVersionAdjustModel.ContainersModel.ContainsKey(tmp)))                        {                            this._specialTemplateID = tmp;                        }                        else                        {                            //抛异常,告知客开指定的ID无效。                            string msg = "[个性化]-优先加载模板ID[" + tmp + "]无效,或者调用时机不正确!";                            this.logger.Error(msg);                        }                    }                }                 return this._specialTemplateID;            }            //通过FirstTemplateID来做set操作        }         public AdjustContainerModel AdjustModel        {            get            {                if (this.AllVersionAdjustModel!=null)                {                    string key = string.Empty;                    if (this.IsEditPartState)                    {                        //V2.1增加客开指定模板ID接口                        //by wangxiaoliang                        //V2SP2支持问题:201007080258                        //--begin--                        if (this.SpecialTemplateID.Length > 0)                        {                            this.AllVersionAdjustModel.EditTemplateID = this.SpecialTemplateID;                        }                        //--end--                         key = this.AllVersionAdjustModel.EditTemplateID;                         if (AllVersionAdjustModel.ContainersModel.ContainsKey(key))                        {                            adjustModelByVersion = AllVersionAdjustModel.ContainersModel[key];                        }                    }                    else                    {                        if (string.IsNullOrEmpty(this.PersonalizationDataVersionKey))                        {                            key = this.AllVersionAdjustModel.DefaultTemplateID;                             //V2.1增加客开指定模板ID接口                            //by wangxiaoliang                            //V2SP2支持问题:201007080258                            //--begin--                            if (this.SpecialTemplateID.Length > 0)                            {                                key = this.SpecialTemplateID;                            }                            //--end--                             if (AllVersionAdjustModel.ContainersModel.ContainsKey(key))                            {                                adjustModelByVersion = AllVersionAdjustModel.ContainersModel[key];                            }                        }                        else                        {                             string[] triggerKeyValue = this.PersonalizationDataVersionKey.Split(                                new string[] { UFSoft.UBF.UI.UIFormPersonalization.Defines.KeyValueSplit }, StringSplitOptions.None);                             string pivotalTriggerID = triggerKeyValue[0];                            string pivotalTriggerValue = triggerKeyValue[1];                             string xmlCTMM = this.AllVersionAdjustModel.CtrlTemplateMapping;                            CtrlTemplateMappingModel ctmm = null;                             if (xmlCTMM.Length > 0)                            {                                ctmm = CtrlTemplateMappingSerializeHelper.Xml2CtrlTemplateMappingModel(xmlCTMM);                            }                            if (ctmm != null)                            {                                string tplID = string.Empty;                                 foreach (CtrlTemplateMappingItem ctmItem in ctmm.CtrlTemplateMappingItems)                                {                                    if (this.IsMappingValue(ctmItem.CtlValue, pivotalTriggerValue))                                    {                                        tplID = ctmItem.TemplateID.ToString();                                         break;                                    }                                }                                 if (tplID.Length == 0)                                {                                    tplID = this.AllAdjustModelOnRunTime.DefaultTemplateID;                                }                                 if (this.AllVersionAdjustModel.ContainersModel.ContainsKey(tplID))                                {                                    adjustModelByVersion = this.AllVersionAdjustModel.ContainersModel[tplID];                                    this.AllVersionAdjustModel.EditTemplateID = tplID;                                }                            }                        }                    }                    return adjustModelByVersion;                }                else                {                    return null;                }            }        }  

RecentComments

评论 RSS

Statistics

989 篇文章
0 个单页
775916 条评论
11 次评分
1443385 次访问
访问统计开始于 2019年12月15日
平均日访问 6808 次
当前 15 人在线