Exemplo n.º 1
0
        protected void InsertItems(IList items, Model.Info_tmp_xls tmpXlsItem)
        {
            Miles.ReoGrid.ReportTemplate reportTemplate = new Miles.ReoGrid.ReportTemplate();
            reportTemplate.TemplateStream  = new MemoryStream(tmpXlsItem.Tmp_Body);
            reportTemplate.InitColumnCount = (int)tmpXlsItem.Column_Count;
            reportTemplate.InitRowCount    = (int)tmpXlsItem.Row_Count;
            reportTemplate.Bind(null, null);

            int itemStartRow    = (int)tmpXls.Item_Start_Row;
            int itemStartColumn = (int)tmpXls.Item_Start_Column;
            int itemGroupCount  = (int)tmpXls.Item_Row_Count;

            Dictionary <string, Model.Tb_tmp_xls_map> dicMap = new Dictionary <string, Model.Tb_tmp_xls_map>();

            foreach (var v in tmpXlsItem.VarMaps)
            {
                dicMap.Add(v.Var_Text, v);
            }
            InsertItems(items, new XlsItemGroup(reportTemplate.GetAllMergedCells(), itemGroupCount, dicMap), itemStartRow, itemStartColumn);
        }