コード例 #1
0
        public void BuildDhtmlxGridHeaderTest()
        {
            var gridSpec = new TestGridSpec();
            var result   = DhtmlxGridHtmlHelpers.BuildDhtmlxGridHeader(gridSpec, GridName, FirmaDhtmlxGridHtmlHelpers.ExcelDownloadUrl);

            Approvals.Verify(result);
        }
コード例 #2
0
        public void BuildDhtmlxGridHeaderTest()
        {
            AssertCustom.IgnoreOnBuildServer();

            var gridSpec = new TestGridSpec();
            var result   = DhtmlxGridHtmlHelpers.BuildDhtmlxGridHeader(gridSpec, GridName, NeptuneDhtmlxGridHtmlHelpers.ExcelDownloadWithFooterUrl, NeptuneDhtmlxGridHtmlHelpers.ExcelDownloadWithoutFooterUrl);

            Approvals.Verify(result);
        }
コード例 #3
0
        /// <summary>
        /// All grids use this
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="html"></param>
        /// <param name="gridSpec"></param>
        /// <param name="gridName"></param>
        /// <param name="optionalGridDataUrl"></param>
        /// <param name="styleString"></param>
        /// <param name="dhtmlxGridResizeType"></param>
        /// <returns></returns>
        public static HtmlString DhtmlxGrid <T>(this HtmlHelper html, GridSpec <T> gridSpec, string gridName, string optionalGridDataUrl, string styleString, DhtmlxGridResizeType dhtmlxGridResizeType)
        {
            var dhtmlxGridHeader = DhtmlxGridHtmlHelpers.BuildDhtmlxGridHeader(gridSpec, gridName, ExcelDownloadWithFooterUrl, ExcelDownloadWithoutFooterUrl);

            var dhtmlxGrid = DhtmlxGridHtmlHelpers.DhtmlxGridImpl(gridSpec,
                                                                  gridName,
                                                                  optionalGridDataUrl,
                                                                  $"background-color:white;{styleString}",
                                                                  null, dhtmlxGridHeader, dhtmlxGridResizeType);

            return(new HtmlString(dhtmlxGrid));
        }
コード例 #4
0
        /// <summary>
        /// All grids use this
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="html"></param>
        /// <param name="gridSpec"></param>
        /// <param name="gridName"></param>
        /// <param name="optionalGridDataUrl"></param>
        /// <param name="styleString"></param>
        /// <param name="dhtmlxGridResizeType"></param>
        /// <returns></returns>
        public static HtmlString DhtmlxGrid <T>(this HtmlHelper html, GridSpec <T> gridSpec, string gridName, string optionalGridDataUrl, string styleString, DhtmlxGridResizeType dhtmlxGridResizeType)
        {
            var dhtmlxGridHeader = DhtmlxGridHtmlHelpers.BuildDhtmlxGridHeader(gridSpec, gridName, ExcelDownloadUrl);

            var saveGridSettingsUrl = SitkaRoute <GridSettingsController> .BuildUrlFromExpression(c => c.SaveGridSettings());

            var dhtmlxGrid = DhtmlxGridHtmlHelpers.DhtmlxGridImpl(gridSpec,
                                                                  gridName,
                                                                  optionalGridDataUrl,
                                                                  $"background-color:white;{styleString}",
                                                                  null, dhtmlxGridHeader, dhtmlxGridResizeType, saveGridSettingsUrl);

            return(new HtmlString(dhtmlxGrid));
        }