Beispiel #1
0
        protected string FormTimeSpan(string name, string label, TimeSpan timeSpan, bool submit)
        {
            var b = new clsJQuery.jqTimeSpanPicker(name, label, PageName, submit)
            {
                id = NameToIdWithPrefix(name),
                defaultTimeSpan = timeSpan
            };

            return(b.Build());
        }
Beispiel #2
0
        private string CreateTimePicker(TimeSpan?timeSpanChosen, string uid, string uniqueControllerId, string key)
        {
            var timePicker = new clsJQuery.jqTimeSpanPicker(key + uid + uniqueControllerId, "", Constants.EventsPage, true);

            timePicker.showDays        = false;
            timePicker.showSeconds     = false;
            timePicker.defaultTimeSpan = new TimeSpan(1, 0, 0);
            if (timeSpanChosen.HasValue)
            {
                timePicker.defaultTimeSpan = timeSpanChosen.Value;
            }

            return(timePicker.Build());
        }
Beispiel #3
0
        public string BuildTimespan(string name, bool rebuilding = false, string label = "")
        {
            var timespan = new clsJQuery.jqTimeSpanPicker(name, label, this.PageName, false);

            timespan.id       = "o" + name;
            timespan.showDays = false;
            if (name == "TimespanTimer")
            {
                timespan.defaultTimeSpan = new TimeSpan(0, 0, _settings.TimerInterval / 1000);
            }

            var ret = string.Empty;

            if (rebuilding)
            {
                ret = timespan.Build();
                this.divToUpdate.Add(name + "_div", ret);
            }
            else
            {
                ret = "<div style='float: left;'  id='" + name + "_div'>" + timespan.Build() + "</div>";
            }
            return(ret);
        }