Пример #1
0
        public static string GetItemHtmlString(HtmlHelper helper, ToolBarItemType buttonType)
        {
            StringBuilder sb = new StringBuilder();

            string rootpath = VirtualPathUtility.ToAbsolute(buttonType.GetImagePath());

            //sb.AppendFormat(@"<span data-toggle=""tooltip"" class=""tooltipLink"" data-original-title=""{1}"">{0}", Environment.NewLine, buttonType.GetItemName());
            sb.AppendFormat(@"<button type=""button"" class=""btn btn-default"" ng-click=""{1}"" data-title=""{2}"" bs-tooltip data-trigger=""hover"" >{0}", Environment.NewLine, buttonType.GetItemFunctionName(), buttonType.GetItemName());
            sb.AppendFormat(@"<span class=""glyphicon""><img src=""{1}"" width=""15"" height=""15"" title=""{2}"" /> {2}</span>{0}", Environment.NewLine, rootpath, buttonType.GetItemName());
            sb.AppendFormat(@"</button>{0}", Environment.NewLine);
            //sb.AppendFormat(@"</span>{0}", Environment.NewLine);

            return(sb.ToString());
        }
Пример #2
0
        public static String GetImagePath(this ToolBarItemType type)
        {
            switch (type)
            {
            case ToolBarItemType.Query:
                return("~/Images/ToolBar/glyphicons-529-database-search.png");

            case ToolBarItemType.QueryReset:
                return("~/Images/ToolBar/glyphicons-82-refresh.png");

            case ToolBarItemType.Run:
                return("~/Images/ToolBar/glyphicons-592-person-running.png");

            case ToolBarItemType.Add:
                return("~/Images/ToolBar/glyphicons-433-plus.png");

            case ToolBarItemType.Delete:
                return("~/Images/ToolBar/glyphicons-208-remove-2.png");

            case ToolBarItemType.Save:
                return("~/Images/ToolBar/glyphicons-207-ok-2.png");

            case ToolBarItemType.AutoRetrieve:
                return("~/Images/ToolBar/glyphicons-182-download-alt.png");

            case ToolBarItemType.Ptint:
                return("~/Images/ToolBar/glyphicons-16-print.png");

            case ToolBarItemType.Confirm:
                return("~/Images/ToolBar/glyphicons-194-circle-ok.png");

            case ToolBarItemType.UnConfirm:
                return("~/Images/ToolBar/glyphicons-193-circle-remove.png");

            case ToolBarItemType.CancelConfirm:
                return("~/Images/ToolBar/glyphicons-192-circle-minus.png");

            case ToolBarItemType.OnlineHelp:
                return("~/Images/ToolBar/glyphicons-195-circle-question-mark.png");

            case ToolBarItemType.Information:
                return("~/Images/ToolBar/glyphicons-196-circle-info.png");

            case ToolBarItemType.Exit:
                return("~/Images/ToolBar/glyphicons-389-exit.png");

            case ToolBarItemType.DetailAdd:
                return("~/Images/ToolBar/glyphicons-109-left-indent.png");

            case ToolBarItemType.DetailDelete:
                return("~/Images/ToolBar/glyphicons-446-floppy-remove.png");

            case ToolBarItemType.FirstRow:
                return("~/Images/ToolBar/glyphicons-171-step-backward.png");

            case ToolBarItemType.PreviousRow:
                return("~/Images/ToolBar/glyphicons-174-play-back.png");

            case ToolBarItemType.NextRow:
                return("~/Images/ToolBar/glyphicons-174-play.png");

            case ToolBarItemType.LastRow:
                return("~/Images/ToolBar/glyphicons-179-step-forward.png");

            default:
                return("");
            }
        }
Пример #3
0
        public static String GetItemFunctionName(this ToolBarItemType type)
        {
            switch (type)
            {
            case ToolBarItemType.Query:
                return("Query()");

            case ToolBarItemType.QueryReset:
                return("QueryReset()");

            case ToolBarItemType.Run:
                return("Run()");

            case ToolBarItemType.Add:
                return("Add()");

            case ToolBarItemType.Delete:
                return("Delete()");

            case ToolBarItemType.Save:
                return("Save()");

            case ToolBarItemType.AutoRetrieve:
                return("AutoRetrieve()");

            case ToolBarItemType.Ptint:
                return("Ptint()");

            case ToolBarItemType.Confirm:
                return("Confirm()");

            case ToolBarItemType.UnConfirm:
                return("UnConfirm()");

            case ToolBarItemType.CancelConfirm:
                return("CancelConfirm()");

            case ToolBarItemType.OnlineHelp:
                return("OnlineHelp()");

            case ToolBarItemType.Information:
                return("Information()");

            case ToolBarItemType.Exit:
                return("Exit()");

            case ToolBarItemType.DetailAdd:
                return("DetailAdd()");

            case ToolBarItemType.DetailDelete:
                return("DetailDelete()");

            case ToolBarItemType.FirstRow:
                return("SelectQueryFirstRow()");

            case ToolBarItemType.PreviousRow:
                return("SelectQueryPreviousRow()");

            case ToolBarItemType.NextRow:
                return("SelectQueryNextRow()");

            case ToolBarItemType.LastRow:
                return("SelectQueryLastRow()");

            default:
                return("");
            }
        }
Пример #4
0
        public static String GetItemName(this ToolBarItemType type)
        {
            switch (type)
            {
            case ToolBarItemType.Query:
                return("查詢");

            case ToolBarItemType.QueryReset:
                return("清除條件");

            case ToolBarItemType.Run:
                return("執行");

            case ToolBarItemType.Add:
                return("新增");

            case ToolBarItemType.Delete:
                return("刪除");

            case ToolBarItemType.Save:
                return("儲存");

            case ToolBarItemType.AutoRetrieve:
                return("自動截取");

            case ToolBarItemType.Ptint:
                return("列印");

            case ToolBarItemType.Confirm:
                return("單據確認");

            case ToolBarItemType.UnConfirm:
                return("單據取消確認");

            case ToolBarItemType.CancelConfirm:
                return("單據作廢");

            case ToolBarItemType.OnlineHelp:
                return("線上說明");

            case ToolBarItemType.Information:
                return("系統資訊");

            case ToolBarItemType.Exit:
                return("離開");

            case ToolBarItemType.DetailAdd:
                return("新增明細");

            case ToolBarItemType.DetailDelete:
                return("刪除明細");

            case ToolBarItemType.FirstRow:
                return("第一筆");

            case ToolBarItemType.PreviousRow:
                return("上一筆");

            case ToolBarItemType.NextRow:
                return("下一筆");

            case ToolBarItemType.LastRow:
                return("最後一筆");

            default:
                return("");
            }
        }