Exemplo n.º 1
0
        private void InitTmpBillItem()
        {
            reportTmpItem.DefineInit = (report) =>
            {
                Stream streamItem = Miles.Coro.Common.Utils.GetClassPathStream(this.GetType(), "GaoShan.Sales.UI.LinkBill.LinkBillItem.xlsx");

                report.TemplateStream  = streamItem;
                report.InitColumnCount = 7;
                report.InitRowCount    = 17;
            };

            reportTmpItem.DefineBeforeFormatGrid = (report, reoGrid) =>
            {
                // hide sheet tab control
                reoGrid.SetSettings(unvell.ReoGrid.WorkbookSettings.View_ShowSheetTabControl, false);

                // hide row header and column header
                reoGrid.CurrentWorksheet.SetSettings(unvell.ReoGrid.WorksheetSettings.View_ShowHeaders, false);

                // set entire worksheet read-only
                reoGrid.CurrentWorksheet.SetSettings(unvell.ReoGrid.WorksheetSettings.Edit_Readonly, true);
            };

            reportTmpItem.Bind(null, null);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
        private void InitTmpBillInfo()
        {
            reportTmpBillInfo.DefineInit = (report) =>
            {
                Stream stream = Miles.Coro.Common.Utils.GetClassPathStream(this.GetType(), "GaoShan.Sales.UI.LinkBill.LinkBillHead.xlsx");

                //reportTmpBillInfo.Load(stream, 19, 7, this.reoGridControl1);
                report.TemplateStream  = stream;
                report.InitRowCount    = 19;
                report.InitColumnCount = 7;
            };

            reportTmpBillInfo.DefineAfterFormatGrid = (report, reoGrid) =>
            {
                reoGrid.CurrentWorksheet.FreezeToCell(2, 0, unvell.ReoGrid.FreezeArea.Top);

                report.SetGridBorderLine();
                report.AutoFitAllColumnWidth();
                report.AutoFitAllRowHeight();
            };


            reportTmpBillInfo.Bind(null, this.reoGridControl1);
        }