Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //    if (!string.IsNullOrEmpty(this.TableFolder))
                //    {
                //        lnkExport.NavigateUrl = "~/" + this.TableFolder + "/" + this.TableName + "/Export.aspx?SearchCondition=" + SearchCondition;
                //    }
                //    else
                //    {
                //        lnkExport.NavigateUrl = "~/" + this.TableName + "/Export.aspx?SearchCondition=" + SearchCondition;
                //    }
                GridActionBarFontFamily      = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.GridActionBarFontFamily);
                GridActionBarForegroundColor = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.GridActionBarForegroundColor);
                GridActionBarFontSize        = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.GridActionBarFontSize);

                //RLink.Style.Add("font-family", GridActionBarFontFamily);
                //RLink.Style.Add("color", GridActionBarForegroundColor);
                //RLink.Style.Add("font-size", GridActionBarFontSize);

                //imgSettings.Style.Add("font-family", GridActionBarFontFamily);
                //imgSettings.Style.Add("color", GridActionBarForegroundColor);
                //imgSettings.Style.Add("font-size", GridActionBarFontSize);

                imgSettings.PostBackUrl = "~/ListSettings/" + TableName;
                SetImagePaths();
            }
        }
Beispiel #2
0
 private void bindPreferences(string userPreferenceCategory)
 {
     drpButtonPanel.SelectedValue    = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.DetailsButtonPanelVisible, userPreferenceCategory);
     drpAEFLMode.SelectedValue       = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.DetailsAEFLModeEnabled, userPreferenceCategory);
     drpPaging.SelectedValue         = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.DetailsPagingEnabled, userPreferenceCategory);
     drpAllTabSelected.SelectedValue = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.AllTabSelected, userPreferenceCategory);
 }
Beispiel #3
0
        public void LoadText()
        {
            var userDateRangeStyle = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.DateRangeStyle);

            if (userDateRangeStyle == "Vertical")
            {
                VerticalStyle.Visible             = true;
                txtSearchVerticalFromDate.Enabled = chkDate.Checked;
                txtSearchVerticalToDate.Enabled   = chkDate.Checked;
                //VerticalFromDateCalender.Format = SessionVariables.UserDateFormat;
                //VerticalToDateCalender.Format = SessionVariables.UserDateFormat;
            }
        }
Beispiel #4
0
        public void Setup(string userPreferenceCategory, bool isBindAllTabs = true)
        {
            IsBindAllTabs = isBindAllTabs;

            SettingCategory = userPreferenceCategory;

            // Get Tab Orientation based on UPCategory
            if (!string.IsNullOrEmpty(SettingCategory))
            {
                PerferenceUtility.CreateUserPreferenceCategoryIfNotExists(SettingCategory, SettingCategory);
            }

            TabOrientation = PerferenceUtility.GetUserPreferenceByKeyAsTabOrientation(ApplicationCommon.TabOrientation, SettingCategory);

            hdnTabOrientation.Value = TabOrientation.ToString();

            IsAllTab = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.AllTabExists, SettingCategory);

            if (IsAllTab)
            {
                IsAllTabSelected = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.AllTabSelected, SettingCategory);
            }

            if (TabOrientation == TabOrientation.Vertical)
            {
                //divTabContainer.Visible = false;
                TabHeaderBackgroundColor = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.TabHeaderBackgroundColor);
            }
            else
            {
                if (IsAllTab)
                {
                    var divAllTabPage = new HtmlGenericControl("div");
                    divTabContentContainer.Controls.Add(divAllTabPage);

                    var oMyData = new MyTabTrackingData();
                    oMyData.Key    = "All";
                    oMyData.Target = divAllTabPage;

                    var liAllTabElement = CreateTabItemHeader("All", "All", IsAllTabSelected, oMyData, divAllTabPage.ClientID);

                    myListTabTracking.Add(oMyData);

                    divTabHeaderList.Controls.Add(liAllTabElement);
                }
            }
        }
Beispiel #5
0
        public void LoadText(DateTime?updatedDate, string updatedBy, string lastAction)
        {
            var userUpdateinfoStyle = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.UpdateInfoStyle);

            if (userUpdateinfoStyle == "UpdateInfoStyle1")
            {
                updateStyle1.Visible = true;
                lblUpdatedDate1.Text = updatedDate == null ? String.Empty : PerferenceUtility.GetUserTimeZoneDateAsString(updatedDate);
                lblUpdatedBy1.Text   = updatedBy;
                lblLastAction1.Text  = lastAction;
            }
            else if (userUpdateinfoStyle == "UpdateInfoStyle2")
            {
                updateStyle2.Visible = true;
                lblUpdatedDate2.Text = updatedDate == null ? String.Empty : PerferenceUtility.GetUserTimeZoneDateAsString(updatedDate);
                lblUpdatedBy2.Text   = updatedBy;
                lblLastAction2.Text  = lastAction;
            }
            else
            {
                updateStyle3.Visible = true;
                double appTimeZoneDifference = 0;

                try
                {
                    appTimeZoneDifference = Convert.ToDouble(ConfigurationManager.AppSettings["UTCTimeZoneDifference"]);
                }
                catch { }

                lblUpdatedDate3.Text = " - " + (updatedDate == null ? String.Empty : GetActivityTimeText((DateTime)updatedDate, appTimeZoneDifference));
                lblUpdatedBy3.Text   = updatedBy;
                lblLastAction3.Text  = lastAction;

                if (lblLastAction3.Text == "Update")
                {
                    lblLastAction3.Text = "updated";
                }
                else
                {
                    lblLastAction3.Text = "inserted";
                }
            }
        }
Beispiel #6
0
        private static void GenerateMenuStyle()
        {
            MenuBackgroundColor = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.MenuBackgroundColor);
            MenuForegroundColor = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.MenuForegroundColor);
            MenuHoverColor      = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.MenuHoverColor);
            MenuBorderColor     = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.MenuBorderColor);

            MenuFontFamily = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.MenuFontFamily);
            MenuFontSize   = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.MenuFontSize);

            var currentPage = HttpContext.Current.CurrentHandler as Page;

            currentPage.Header.Controls.Add(new LiteralControl(@"<style type='text/css'> 
				div.app-main-menu
				{
				}

				div.app-main-menu ul
				{
					list-style: none;
					margin: 0px;
					padding: 0px;
					width: auto;
					z-index: 999;
				}
				
				div.app-main-menu ul li a:active
				{
					background-color: #465c71;
					color: #cfdbe6;
					text-decoration: none;
				}
				div.app-main-menu ul li a, div.app-main-menu ul li a:visited
				{
				display: block;
				line-height: 1.35em;
				padding: 4px 20px;
				text-decoration: none;
				white-space: nowrap;
				border: 1px solid "                 + MenuBorderColor + ";color:" + MenuForegroundColor + " ;background-color:" + MenuBackgroundColor + ";font-family:" + MenuFontFamily + ";font-size:" + MenuFontSize + "; }div.menu ul li a:hover	{color: #465c71;text-decoration: none;background-color:"+ MenuHoverColor + ";} </style> "));
        }