Exemplo n.º 1
0
 public static MvcHtmlString DataView_ControlPanel(this HtmlHelper helper, DataViewOptions options)
 {
     return(MvcHtmlString.Create(
                "<div class=\"zpm-dv-control-panel\">" +
                helper.DataView_Message(options).ToString() +
                helper.DataView_SaveButton(options).ToString() +
                helper.DataView_DeleteButton(options).ToString() +
                helper.DataView_CancelButton(options).ToString() +
                "</div>"));
 }
Exemplo n.º 2
0
 public static MvcHtmlString DataView_NewDataView(this HtmlHelper helper, DataViewOptions options)
 {
     return(MvcHtmlString.Create(
                "new ZpmDataView(" +
                "\"" + options.ModelName + "View\"," +
                "\"" + options.ModelTextName + "\"," +
                "\"" + options.GetModel + "\"," +
                "\"" + options.FocusOnChange + "\"," +
                "\"" + options.FocusOnAdd + "\"" +
                ")"));
 }
Exemplo n.º 3
0
 public static MvcHtmlString DataView_Filter(this HtmlHelper helper, DataViewOptions options, int height = 22, string prefixHtml = "")
 {
     options.FilterHeight = height;
     return(MvcHtmlString.Create(
                "<div class=\"zpm-dv-filter-div\" style=\"height:" + (options.FilterHeight).ToString() + "px\">" +
                prefixHtml +
                "Filter" +
                "  <input class=\"zpm-dv-filter\" type=\"text\" maxlength=\"30\" onkeyup =\"document.zpmDataView.FilterKeyUp(this)\"" +
                " style=\"width:" + (options.ListWidth - 105).ToString() + "px\" />" +
                "  <input type=\"button\" value=\"Clear\" onclick=\"document.zpmDataView.FilterClear();\" />" +
                "</div>"));
 }
Exemplo n.º 4
0
        public static IHtmlString DataView_AddButton(this HtmlHelper helper, DataViewOptions options)
        {
            TagBuilder tb = new TagBuilder("img");

            tb.Attributes.Add("src", System.Web.VirtualPathUtility.ToAbsolute("~/content/images/AddIcon.png"));
            tb.Attributes.Add("alt", "Add " + options.ModelTextName);
            tb.Attributes.Add("title", "Add new " + options.ModelTextName);
            tb.Attributes.Add("class", "zpm-dv-add-button");
            tb.Attributes.Add("style", "z-index:90; margin-left:" + (options.ListWidth - 21).ToString() + "px;");
            tb.Attributes.Add("onclick", "document.zpmDataView.Add('" + options.AddModel + "')");
            return(new MvcHtmlString(tb.ToString()));
        }
Exemplo n.º 5
0
 public static MvcHtmlString DataView_CancelButton(this HtmlHelper helper, DataViewOptions options)
 {
     return(MvcHtmlString.Create("<input type=\"button\" class=\"zpm-dv-control-panel-cancel\" value=\"Cancel\" onclick=\"document.zpmDataView.Cancel()\" />"));
 }
Exemplo n.º 6
0
 public static MvcHtmlString DataView_DeleteButton(this HtmlHelper helper, DataViewOptions options)
 {
     return(MvcHtmlString.Create("<input type=\"button\" class=\"zpm-dv-control-panel-delete\" value=\"Delete\" onclick=\"document.zpmDataView.Delete('" + options.DeleteModel + "')\" />"));
 }
Exemplo n.º 7
0
 public static MvcHtmlString DataView_Message(this HtmlHelper helper, DataViewOptions options)
 {
     return(MvcHtmlString.Create("<div id=\"message\" class=\"zpm-dv-control-panel-message\"></div>"));
 }