private SqlCommand GetCmdSaveFactoryView() { SqlCommand cmd = new SqlCommand("UAP_Report_Upgrade872ViewFactoryData"); cmd.CommandType = CommandType.StoredProcedure; // Definition Properties cmd.Parameters.Add(SqlHelper.GetParameter("@ReportID", SqlDbType.NVarChar, 100, this.ID)); cmd.Parameters.Add(SqlHelper.GetParameter("@bSystem", SqlDbType.Bit, this.bSystem)); UpgradeReportView view = this.ReportViews[0]; cmd.Parameters.Add(SqlHelper.GetParameter("@ViewID", SqlDbType.NVarChar, 100, view.ID)); cmd.Parameters.Add(SqlHelper.GetParameter("@Columns", SqlDbType.NText, view.Columns)); cmd.Parameters.Add(SqlHelper.GetParameter("@BlandScape", SqlDbType.Bit, view.BlandScape)); cmd.Parameters.Add(SqlHelper.GetParameter("@PageMargins", SqlDbType.NVarChar, 50, view.PageMargins)); cmd.Parameters.Add(SqlHelper.GetParameter("@CommonFormat", SqlDbType.NText, view.CommonFormat)); cmd.Parameters.Add(SqlHelper.GetParameter("@ViewNameCN", SqlDbType.NVarChar, 100, "标准视图")); cmd.Parameters.Add(SqlHelper.GetParameter("@ViewNameTW", SqlDbType.NVarChar, 100, "標準視圖")); cmd.Parameters.Add(SqlHelper.GetParameter("@ViewNameUS", SqlDbType.NVarChar, 100, "Default view")); cmd.Parameters.Add(SqlHelper.GetParameter("@LocaleFormatCN", SqlDbType.NText, view.ViewLocaleInfos["zh-CN"].LocaleFormat)); cmd.Parameters.Add(SqlHelper.GetParameter("@LocaleFormatTW", SqlDbType.NText, view.ViewLocaleInfos["zh-TW"].LocaleFormat)); cmd.Parameters.Add(SqlHelper.GetParameter("@LocaleFormatUS", SqlDbType.NText, view.ViewLocaleInfos["en-US"].LocaleFormat)); cmd.Parameters.Add(SqlHelper.GetParameter("@GroupSchemas", SqlDbType.NText, view.GroupSchemas)); cmd.Parameters.Add(SqlHelper.GetParameter("@LevelExpand", SqlDbType.NText, view.LevelExpand)); cmd.Parameters.Add(SqlHelper.GetParameter("@cAccId", SqlDbType.NVarChar, 100, _cAccId)); cmd.Parameters.Add(SqlHelper.GetParameter("@cYear", SqlDbType.VarChar, 100, _cYear)); //// 为了区分其不是输出参数,把PaperType的类型转换为 //// object.GetParameter的重载列表中第三个参数且是最 //// 后一个参数是int时表明此参数是输出类型 cmd.Parameters.Add(SqlHelper.GetParameter("@PaperType", SqlDbType.Int, (object)view.PaperType)); cmd.Parameters.Add(SqlHelper.GetParameter("@ViewType", SqlDbType.NVarChar, (object)view.ViewType)); return(cmd); }
/// <summary> /// 设置视图级信息 /// </summary> private void SetViewMeta(UpgradeReport ur) { UpgradeReportView urv = new UpgradeReportView(ur); ur.ReportViews.Add(urv); urv.ID = this.GetArgString(UpgradeReportMetaWrapper.ViewId); urv.bSystem = this.GetArgBoolean(UpgradeReportMetaWrapper.ViewIsSystem); urv.ViewType = this.GetArgInt(UpgradeReportMetaWrapper.ViewViewType); urv.GroupSchemas = this.GetArgString(UpgradeReportMetaWrapper.ViewGroupSchemas); urv.CommonFormat = this.GetArgString(UpgradeReportMetaWrapper.ViewCommonFormat); urv.LevelExpand = this.GetArgString(UpgradeReportMetaWrapper.ViewLevelExpand); urv.Columns = this.GetArgString(UpgradeReportMetaWrapper.ViewColumns); urv.BlandScape = this.GetArgBoolean(UpgradeReportMetaWrapper.ViewBlandScape); urv.PageMargins = this.GetArgString(UpgradeReportMetaWrapper.ViewPageMargins, "80,80,80,80"); urv.PaperType = this.GetArgInt(UpgradeReportMetaWrapper.ViewPaperType); this.AddViewLoacleInfo("zh-CN", this.GetArgString(UpgradeReportMetaWrapper.ViewLocaleFormatCN), urv); this.AddViewLoacleInfo("zh-TW", this.GetArgString(UpgradeReportMetaWrapper.ViewLocaleFormatTW), urv); this.AddViewLoacleInfo("en-US", this.GetArgString(UpgradeReportMetaWrapper.ViewLocaleFormatEN), urv); }
private void AddViewLoacleInfo( string locale, string localeFormat, UpgradeReportView urv) { ReportViewLocaleInfo rvli = new ReportViewLocaleInfo(); rvli.LocaleID = locale; rvli.LocaleFormat = localeFormat; urv.ViewLocaleInfos.Add(rvli); }
private SqlCommand GetCmdExpandLang(string localeId) { SqlCommand cmd = new SqlCommand("UAP_Report_ExpandLangAfterUpgrade"); cmd.CommandType = CommandType.StoredProcedure; // Definition Properties cmd.Parameters.Add(SqlHelper.GetParameter("@LocaleId", SqlDbType.NVarChar, 20, localeId)); UpgradeReportView view = this.ReportViews[0]; cmd.Parameters.Add(SqlHelper.GetParameter("@ViewID", SqlDbType.NVarChar, 100, view.ID)); cmd.Parameters.Add(SqlHelper.GetParameter("@LocaleFormatLang", SqlDbType.NText, view.ViewLocaleInfos[localeId].LocaleFormat)); return(cmd); }
private SqlCommand GetCmdSave() { SqlCommand cmd = new SqlCommand("UAP_Report_Upgrade872"); cmd.CommandType = CommandType.StoredProcedure; // Definition Properties cmd.Parameters.Add(SqlHelper.GetParameter("@ReportID", SqlDbType.NVarChar, 100, this.ID)); cmd.Parameters.Add(SqlHelper.GetParameter("@ReportNameCN", SqlDbType.NVarChar, 100, this.ReportLocaleInfos["zh-CN"].Name)); cmd.Parameters.Add(SqlHelper.GetParameter("@ReportNameTW", SqlDbType.NVarChar, 100, this.ReportLocaleInfos["zh-TW"].Name)); cmd.Parameters.Add(SqlHelper.GetParameter("@ReportNameUS", SqlDbType.NVarChar, 100, this.ReportLocaleInfos["en-US"].Name)); cmd.Parameters.Add(SqlHelper.GetParameter("@FilterID", SqlDbType.NVarChar, 100, this.FilterID)); cmd.Parameters.Add(SqlHelper.GetParameter("@SubID", SqlDbType.NVarChar, 50, this.SubProjectID)); cmd.Parameters.Add(SqlHelper.GetParameter("@DataSourceID", SqlDbType.NVarChar, 100, this.DataSourceInfo.DataSourceBO == null?"":this.DataSourceInfo.DataSourceBO.MetaID)); cmd.Parameters.Add(SqlHelper.GetParameter("@FunctionName", SqlDbType.NVarChar, 50, "ReportFunction")); cmd.Parameters.Add(SqlHelper.GetParameter("@Description", SqlDbType.NVarChar, 256, this.Description)); cmd.Parameters.Add(SqlHelper.GetParameter("@ClassName", SqlDbType.NVarChar, 800, this.ClassName)); cmd.Parameters.Add(SqlHelper.GetParameter("@FilterClass", SqlDbType.NVarChar, 800, this.FilterClass)); cmd.Parameters.Add(SqlHelper.GetParameter("@CreatedTime", SqlDbType.DateTime, this._CreatedTime)); cmd.Parameters.Add(SqlHelper.GetParameter("@DescriptionCN", SqlDbType.NVarChar, 300, this.ReportLocaleInfos["zh-CN"].Description)); cmd.Parameters.Add(SqlHelper.GetParameter("@DescriptionTW", SqlDbType.NVarChar, 300, this.ReportLocaleInfos["zh-TW"].Description)); cmd.Parameters.Add(SqlHelper.GetParameter("@DescriptionUS", SqlDbType.NVarChar, 300, this.ReportLocaleInfos["en-US"].Description)); cmd.Parameters.Add(SqlHelper.GetParameter("@Creator", SqlDbType.NVarChar, 100, "Administrator")); cmd.Parameters.Add(SqlHelper.GetParameter("@HelpFileName", SqlDbType.NVarChar, 300, this.HelpFileName)); cmd.Parameters.Add(SqlHelper.GetParameter("@HelpIndex", SqlDbType.NVarChar, 30, this.HelpIndex)); cmd.Parameters.Add(SqlHelper.GetParameter("@HelpKeyWord", SqlDbType.NVarChar, 50, this.HelpKeyWord)); cmd.Parameters.Add(SqlHelper.GetParameter("@bSystem", SqlDbType.Bit, this.bSystem)); cmd.Parameters.Add(SqlHelper.GetParameter("@RootReportId", SqlDbType.NVarChar, 100, this.RootReportId)); UpgradeReportView view = this.ReportViews[0]; cmd.Parameters.Add(SqlHelper.GetParameter("@ViewID", SqlDbType.NVarChar, 100, view.ID)); cmd.Parameters.Add(SqlHelper.GetParameter("@Columns", SqlDbType.NText, view.Columns)); cmd.Parameters.Add(SqlHelper.GetParameter("@BlandScape", SqlDbType.Bit, view.BlandScape)); cmd.Parameters.Add(SqlHelper.GetParameter("@PageMargins", SqlDbType.NVarChar, 50, view.PageMargins)); cmd.Parameters.Add(SqlHelper.GetParameter("@CommonFormat", SqlDbType.NText, view.CommonFormat)); cmd.Parameters.Add(SqlHelper.GetParameter("@ViewNameCN", SqlDbType.NVarChar, 100, "标准视图")); cmd.Parameters.Add(SqlHelper.GetParameter("@ViewNameTW", SqlDbType.NVarChar, 100, "標準視圖")); cmd.Parameters.Add(SqlHelper.GetParameter("@ViewNameUS", SqlDbType.NVarChar, 100, "Default view")); cmd.Parameters.Add(SqlHelper.GetParameter("@LocaleFormatCN", SqlDbType.NText, view.ViewLocaleInfos["zh-CN"].LocaleFormat)); cmd.Parameters.Add(SqlHelper.GetParameter("@LocaleFormatTW", SqlDbType.NText, view.ViewLocaleInfos["zh-TW"].LocaleFormat)); cmd.Parameters.Add(SqlHelper.GetParameter("@LocaleFormatUS", SqlDbType.NText, view.ViewLocaleInfos["en-US"].LocaleFormat)); cmd.Parameters.Add(SqlHelper.GetParameter("@GroupSchemas", SqlDbType.NText, view.GroupSchemas)); cmd.Parameters.Add(SqlHelper.GetParameter("@LevelExpand", SqlDbType.NText, view.LevelExpand)); cmd.Parameters.Add(SqlHelper.GetParameter("@cAccId", SqlDbType.NVarChar, 100, _cAccId)); cmd.Parameters.Add(SqlHelper.GetParameter("@cYear", SqlDbType.VarChar, 100, _cYear)); // 为了区分其不是输出参数,把PaperType的类型转换为 // object.GetParameter的重载列表中第三个参数且是最 // 后一个参数是int时表明此参数是输出类型 cmd.Parameters.Add(SqlHelper.GetParameter("@PaperType", SqlDbType.Int, (object)view.PaperType)); cmd.Parameters.Add(SqlHelper.GetParameter("@ViewType", SqlDbType.NVarChar, (object)view.ViewType)); cmd.Parameters.Add(SqlHelper.GetParameter("@ReportName861", SqlDbType.NVarChar, 200, this.ReportName861)); cmd.Parameters.Add(SqlHelper.GetParameter("@MappingMenuId", SqlDbType.NVarChar, 200, this.MappingMenuId)); cmd.Parameters.Add(SqlHelper.GetParameter("@err", SqlDbType.NVarChar, 2000)); cmd.Parameters.Add(SqlHelper.GetParameter("@IsNeedExpandEN", SqlDbType.Bit, this.IsNeedExpandEN)); cmd.Parameters.Add(SqlHelper.GetParameter("@IsNeedExpandTW", SqlDbType.Bit, this.IsNeedExpandTW)); return(cmd); }
public void Remove(UpgradeReportView item) { base.List.Remove(item); }
public void Add(UpgradeReportView item) { base.List.Add(item); }
public ReportViewLocaleInfoCollection(UpgradeReportView reportView) { this.ReportView = reportView; }