Priya.InfoList.Views.InfoDetailView.GetScript C# (CSharp) Method

GetScript() public static method

public static GetScript ( bool loadSaveScript, bool loadListScript ) : string
loadSaveScript bool
loadListScript bool
return string
        public static string GetScript(bool loadSaveScript, bool loadListScript)
        {
            string htmlSaveScript = "";
            if (loadSaveScript == true)
            {
                htmlSaveScript = GetSaveScript();
            }
            string htmlListScript = "";
            if (loadListScript == true)
            {
                htmlListScript = GetListScript();
            }
            return htmlSaveScript + htmlListScript;
        }

Usage Example

Ejemplo n.º 1
0
        public static string GetView(long infoPageId, long dataIndex, string templateSuffix, bool showSave, bool showList, bool loadSaveScript, bool loadListScript)
        {
            long id           = 0;
            long pageNo       = 1;
            long itemsPerPage = UtilsGeneric.DefaultItemsPerPage;

            #region Save View

            string htmlSaveView = "";
            htmlSaveView = GetSaveView(id, pageNo, itemsPerPage, dataIndex, templateSuffix, infoPageId, loadSaveScript, showSave);
            //htmlSaveView += InfoDetailView.GetView(0, dataIndex + 1, templateSuffix, false, false, true, true);
            htmlSaveView += InfoDetailView.GetScript(true, true);

            #endregion

            #region List View

            string htmlListView = "";
            htmlListView = GetListView(pageNo, itemsPerPage, dataIndex, templateSuffix, infoPageId, loadListScript, showList);

            #endregion

            var template = new TemplateInfoSection
            {
                //SaveExpand = (id == 0) ? "true" : "false",
                SaveDetail = htmlSaveView,
                //ListExpand = (id == 0) ? "false" : "true",
                ListDetail = htmlListView,
            };

            string message = "";
            string html    = template.GetFilled(templateSuffix, UtilsGeneric.Validate, UtilsGeneric.ThrowException, out message);
            return(html);
        }