示例#1
0
        private void UpdateToolBar()
        {
            // get objects in tool bar
            Infragistics.WebUI.UltraWebToolbar.TBLabel    tbLblNotificationDate = uwtNotifications.Items.FromKeyLabel("lblNotificationDate");
            Infragistics.WebUI.UltraWebToolbar.TBarButton tbBtnNext             = uwtNotifications.Items.FromKeyButton("Next");
            Infragistics.WebUI.UltraWebToolbar.TBarButton tbBtnPrevious         = uwtNotifications.Items.FromKeyButton("Previous");

            // update date label
            tbLblNotificationDate.Text = _NotifDate.Value.ToString(HyperCatalog.Shared.SessionState.User.FormatDate);

            // update buttons
            TimeSpan tsDateMin = _NotifDate.Value.Subtract(DateTime.MinValue);

            tbBtnPrevious.Enabled = tsDateMin.Days > 0;
            //tbBtnPrevious.Enabled=!(_NotifDate.ToString(SessionState.User.FormatDate).Equals(DateTime.MinValue.ToString(SessionState.User.FormatDate)));
            TimeSpan tsDateNow = _NotifDate.Value.Subtract(DateTime.Now);
            TimeSpan tsDateMax = _NotifDate.Value.Subtract(DateTime.MaxValue);

            tbBtnNext.Enabled = ((tsDateMax.Days < 0) && (tsDateNow.Days < 0));
            //tbBtnNext.Enabled=!(_NotifDate.ToString(SessionState.User.FormatDate).Equals(DateTime.MaxValue.ToString(SessionState.User.FormatDate))) && !(_NotifDate.ToString(SessionState.User.FormatDate).Equals(DateTime.Now.ToString(SessionState.User.FormatDate)));
        }
示例#2
0
 public static void ShowToolBarButton(Infragistics.WebUI.UltraWebToolbar.TBarButton btn)
 {
     //btn.DefaultStyle.CustomRules = string.Empty;
     //btn.DefaultStyle.Width = btn.ToolBar.ItemWidthDefault;
     btn.Visible = true;
 }
示例#3
0
 public static void ShowToolBarButton(Infragistics.WebUI.UltraWebToolbar.TBarButton btn, int width)
 {
     btn.DefaultStyle.Width = Unit.Pixel(width);
 }
示例#4
0
 public static void HideToolBarButton(Infragistics.WebUI.UltraWebToolbar.TBarButton btn)
 {
     //btn.DefaultStyle.CustomRules = "display:none";
     //btn.DefaultStyle.Width = Unit.Pixel(0);
     btn.Visible = false;
 }