Exemple #1
0
        public void UpdateUserFieldConfigurationMode(string value, string value1)
        {
            var entityName      = value1;
            var settingCategory = entityName + "ListView";

            PerferenceUtility.UpdateUserPreference(settingCategory, ApplicationCommon.FieldConfigurationMode, value);
        }
Exemple #2
0
        void txtPS_TextChanged(object sender, EventArgs e)
        {
            var objps    = (TextBox)sender;
            var pageSize = DefaultRowCount;

            if (objps.Text == "ALL")
            {
                MainGridView.PageSize = dtGlobal.Rows.Count;
                pageSize = MainGridView.PageSize;
            }
            else
            {
                pageSize = int.Parse(objps.Text);
                MainGridView.PageSize = pageSize;
            }

            PerferenceUtility.UpdateUserPreference(SettingCategory, ApplicationCommon.DefaultRowCountKey, pageSize.ToString());

            MainGridView.PageIndex = 0;
            MainGridView.DataBind();
            PageSize = MainGridView.PageSize;
            OnChanged(EventArgs.Empty);

            //SortGridView(String.Empty, SortDirection.Ascending.ToString());
        }
Exemple #3
0
        private void LoadActivityStream()
        {
            var data = new UserPreferenceCategoryDataModel();

            if (!string.IsNullOrEmpty(ActivityStreamName))
            {
                PerferenceUtility.CreateUserPreferenceCategoryIfNotExists(ActivityStreamName, SessionVariables.ApplicationUserFullName + " " + ActivityStreamName);
            }

            if (ActivityStreamAuditId != null)
            {
                PerferenceUtility.UpdateUserPreference(ActivityStreamName, ActivityStreamCommon.ActivityStreamAuditId, ActivityStreamAuditId.ToString());
            }

            hypSettings.NavigateUrl += Page.GetRouteUrl("ActivityStreamRoute", new { Action = "Settings", CategoryName = ActivityStreamName });
            try
            {
                var setId = ApplicationCommon.GetSetId();
                if (Convert.ToString(Page.RouteData.Values["Action"]).ToLower().Contains("detail") && !string.IsNullOrEmpty(Convert.ToString(Page.RouteData.Values["SetId"])))
                {
                    hypSettings.NavigateUrl += "&SetId=" + setId + "&returnPage=appUserDetail";
                }
                else if (Convert.ToString(Page.RouteData.Values["Action"]).ToLower().Contains("update") && !string.IsNullOrEmpty(Convert.ToString(Page.RouteData.Values["SetId"])))
                {
                    hypSettings.NavigateUrl += "&SetId=" + setId + "&returnPage=appUserUpdate";
                }
            }
            catch { }
            ProcessAlerts();
        }
Exemple #4
0
        // GET api/summary/GetList
        public IEnumerable <QuestionDataModel> GetList(string value, string value1)
        {
            var settingCategory = value1;
            var searchString    = value;

            var dictionaryObject = JsonConvert.DeserializeObject <Dictionary <string, string> >(searchString);

            // save search filter parameters in user preference
            if (dictionaryObject != null)
            {
                foreach (var searchFilterColumnName in dictionaryObject.Keys)
                {
                    var searchFilterValue = dictionaryObject[searchFilterColumnName];
                    PerferenceUtility.UpdateUserPreference(settingCategory, searchFilterColumnName, dictionaryObject[searchFilterColumnName]);
                }
            }
            var dataQuery = new QuestionDataModel();

            try
            {
                dataQuery = JsonConvert.DeserializeObject <QuestionDataModel>(searchString);
            }
            catch { }

            // igonore when value is -1
            if (dataQuery.QuestionCategoryId == -1)
            {
                dataQuery.QuestionCategoryId = null;
            }
            return(QuestionDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile));
        }
Exemple #5
0
		/// <summary>
		/// This method will be called by AJAX from Index Page for generating column set according to the passed FCModeId
		/// </summary>
		/// <param name="searchString"></param>
		/// <param name="page"></param>
		/// <param name="pageSize"></param>
		/// <returns></returns>
		public JsonResult ReloadKendoGridConfiguration(string fcModeId, string searchString)
		{
			PerferenceUtility.UpdateUserPreference(settingCategory, ApplicationCommon.FieldConfigurationMode, fcModeId.ToString());

			var configString = GetKendoColumnSetByFCMode(Convert.ToInt32(fcModeId));
			return Json(configString, JsonRequestBehavior.AllowGet);
		}
Exemple #6
0
        public void SetUPData(string value1, string value2, string value3)
        {
            var upKey = value1;
            var settingCategoryName = value2;
            var upValue             = value3;

            PerferenceUtility.UpdateUserPreference(settingCategoryName, upKey, upValue);
        }
Exemple #7
0
 protected override void SaveSettings()
 {
     PerferenceUtility.UpdateUserPreference
     (
         SettingCategory
         , ApplicationCommon.SearchFieldName
         , txtSearchConditionStoredProcedureLogId.Text
     );
 }
Exemple #8
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            ApplicationId = ddlApplication.SelectedValue;

            DataBind();

            //PerferenceUtility.UpdateUserPreference(SettingCategory, "DefaultViewApplicationId", ddlApplication.SelectedValue);
            PerferenceUtility.UpdateUserPreference(SettingCategory, ApplicationCommon.GroupBy, drpGroupBy.SelectedValue);
        }
Exemple #9
0
        protected override void SaveSettings()
        {
            PerferenceUtility.UpdateUserPreference
            (
                SettingCategory
                , ApplicationCommon.SearchFieldName
                , txtSearchConditionName.Text
            );

            PerferenceUtility.UpdateUserPreference(SettingCategory,
                                                   SuperKeyDataModel.DataColumns.SystemEntityTypeId,
                                                   drpSearchConditionSystemEntityType.SelectedItem.Text);
        }
Exemple #10
0
        protected void ddlFieldConfigurationMode_SelectedIndexChanged(object sender, EventArgs e)
        {
            var currentEntity = "ScheduleDetail";

            GetData();

            var fcMode = ddlFieldConfigurationMode.SelectedValue;

            SessionVariables.SaveSessionInstanceFCMode(Convert.ToInt32(fcMode), currentEntity);

            var settingCategory = "ScheduleDetailDefaultView";

            PerferenceUtility.UpdateUserPreference(settingCategory, ApplicationCommon.FieldConfigurationMode, fcMode);
        }
Exemple #11
0
        private void ManageControlVisibility(string controlTitle)
        {
            var sbm = Master.SubMenuObject;

            switch (controlTitle)
            {
            case "Search Box":
                oSearchFilter.Visible = true;
                PerferenceUtility.UpdateUserPreference(oSearchFilter.SearchControl.SettingCategory, ApplicationCommon.ControlVisible, "true");
                break;

            case "Sub Menu":
                sbm.Visible = true;
                PerferenceUtility.UpdateUserPreference(sbm.SettingCategory, ApplicationCommon.ControlVisible, "true");
                break;
            }
        }
Exemple #12
0
        private void ManageControlVisibility(string controlTitle)
        {
            switch (controlTitle)
            {
            case "Search Box":
                SearchFilterCore.Visible = true;
                PerferenceUtility.UpdateUserPreference(SearchFilterCore.SettingCategory, ApplicationCommon.ControlVisible, "true");
                break;

            case "Sub Menu":
                SubMenuCore.Visible = true;
                PerferenceUtility.UpdateUserPreference(SubMenuCore.SettingCategory, ApplicationCommon.ControlVisible, "true");
                break;

            case "Bread Crumb":
                BreadCrumbObject.Visible = true;
                PerferenceUtility.UpdateUserPreference(BreadCrumbObject.SettingCategory, ApplicationCommon.ControlVisible, "true");
                break;
            }
        }
Exemple #13
0
        public bool SetStoredSearchData(string value, string value1)
        {
            var settingCategoryName = value;

            var fields = new List <string>()
            {
                "ApplicationUserId",
                "FromSearchDate",
                "ToSearchDate"
            };

            var storedValues = JsonConvert.DeserializeObject <Dictionary <string, string> >(value1);

            foreach (var fieldName in fields)
            {
                PerferenceUtility.UpdateUserPreference(settingCategoryName, fieldName, storedValues[fieldName]);
            }

            return(true);
        }
Exemple #14
0
        public bool SetStoredSearchData(string value, string value1)
        {
            var settingCategoryName = value;

            var fields = new List<string>(){ 
                    ApplicationCommon.Computer, 
                    ApplicationCommon.ConnectionKey, 
                    ApplicationCommon.LogUser, 
                    ApplicationCommon.GroupBy};

            var storedValues = JsonConvert.DeserializeObject<Dictionary<string, string>>(value1);

            foreach (var fieldName in fields)
            {
                PerferenceUtility.UpdateUserPreference(settingCategoryName, fieldName, storedValues[fieldName]);
            }

            return true;

        }
Exemple #15
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            var data = new Framework.Components.LogAndTrace.UserLoginHistoryDataModel();

            if (oDate.FromDate != null)
            {
                data.FromSearchDate = oDate.FromDate;
            }
            if (oDate.ToDate != null)
            {
                data.ToSearchDate = oDate.ToDate;
            }



            LoginHistoryGrid.DataSource = Framework.Components.LogAndTrace.UserLoginHistoryDataManager.Search(data, SessionVariables.RequestProfile);
            LoginHistoryGrid.DataBind();
            PerferenceUtility.UpdateUserPreference("General", ApplicationCommon.DateRangeFormat, oDate.DateRangeFormatId.ToString());
            PerferenceUtility.UpdateUserPreference("General", ApplicationCommon.FromDateRange, oDate.FromDate.ToString());
            //ApplicationCommon.UpdateUserPreference("General", ApplicationCommon.ToDate, oDate.ToDate.ToString());
        }
Exemple #16
0
        // GET api/summary/GetList
        public IEnumerable <ChartOfAccountsDataModel> GetList(string value, string value1)
        {
            var settingCategory = value1;
            var searchString    = value;

            var dictionaryObject = JsonConvert.DeserializeObject <Dictionary <string, string> >(searchString);

            // save search filter parameters in user preference
            if (dictionaryObject != null)
            {
                foreach (var searchFilterColumnName in dictionaryObject.Keys)
                {
                    var searchFilterValue = dictionaryObject[searchFilterColumnName];
                    PerferenceUtility.UpdateUserPreference(settingCategory, searchFilterColumnName, dictionaryObject[searchFilterColumnName]);
                }
            }

            var dataQuery = JsonConvert.DeserializeObject <ChartOfAccountsDataModel>(searchString);

            return(ChartOfAccountsDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile));
        }
Exemple #17
0
        protected void btnSubmit_OnClick(object sender, EventArgs e)
        {
            try
            {
                var pId = Int32.Parse(txtAuditId.Text.Trim());

                var data = new DataModel.Framework.AuthenticationAndAuthorization.ApplicationUserDataModel();
                data.ApplicationUserId = pId;

                var dt = Framework.Components.ApplicationUser.ApplicationUserDataManager.GetDetails(data, SessionVariables.RequestProfile);
                if (dt != null & dt.Rows.Count == 1)
                {
                    var row = dt.Rows[0];

                    SetAuditId(Convert.ToInt32(row[ApplicationUserDataModel.DataColumns.ApplicationUserId]));

                    SetIsTesting();

                    SetUserTheme();

                    PerferenceUtility.UpdateUserPreference("General", ApplicationCommon.GridDefaultClickActionKey, drpDefaultClickAction.SelectedValue);
                    PerferenceUtility.UpdateUserPreference("General", ApplicationCommon.UserMenuCategory, drpMenuCategory.SelectedValue);
                    PerferenceUtility.UpdateUserPreference("General", ApplicationCommon.Language, drpLanguage.SelectedValue);

                    SetUserCountry();

                    //SetUserMenuCategory();


                    Response.Redirect("~/Default.aspx");
                }
                else
                {
                    // Perform Action if Audit Id is invalid
                }
            }
            catch
            {
            }
        }
Exemple #18
0
        private void SaveUserPreferences()
        {
            PerferenceUtility.UpdateUserPreference(SettingCategory, ScheduleDetailDataModel.DataColumns.PersonId, drpPersons.SelectedValue);
            PerferenceUtility.UpdateUserPreference(SettingCategory, ScheduleDetailDataModel.DataColumns.ScheduleDetailActivityCategoryId, drpWorkCategory.SelectedValue);
            PerferenceUtility.UpdateUserPreference(SettingCategory, ScheduleDetailDataModel.DataColumns.Message, txtMessage.Text.Trim());

            PerferenceUtility.UpdateUserPreference(SettingCategory, ApplicationCommon.XAxisKey, drpXAxis.SelectedValue);
            PerferenceUtility.UpdateUserPreference(SettingCategory, ApplicationCommon.YAxisKey, drpYAxis.SelectedValue);
            PerferenceUtility.UpdateUserPreference(SettingCategory, ApplicationCommon.ZAxisKey, drpZAxis.SelectedValue);

            PerferenceUtility.UpdateUserPreference(SettingCategory, ApplicationCommon.ShowAggeregateKey, drpShowAggeregate.SelectedValue);
            PerferenceUtility.UpdateUserPreference(SettingCategory, ApplicationCommon.AggeregateFunctionKey, drpFunction.SelectedValue);

            oDateRange.SaveDateValues(oDateRange.DateRangeDropDown.SelectedValue, oDateRange.FromDateTime, oDateRange.ToDateTime);

            var fromDate = DateTimeHelper.FromUserDateFormatToApplicationDateFormat(oDateRange.FromDateTime);
            var toDate   = DateTimeHelper.FromUserDateFormatToApplicationDateFormat(oDateRange.ToDateTime);

            var searchDates = fromDate + "&" + toDate + "&" + oDateRange.Checked;

            PerferenceUtility.UpdateUserPreference(SettingCategory, ScheduleDetailDataModel.DataColumns.WorkDate, searchDates);
        }
Exemple #19
0
        protected override void SaveSettings()
        {
            PerferenceUtility.UpdateUserPreference
            (
                SettingCategory,
                SystemEntityTypeDataModel.DataColumns.SystemEntityTypeId,
                drpSearchConditionSystemEntityType.SelectedValue
            );
            PerferenceUtility.UpdateUserPreference
            (
                SettingCategory
                , HelpPageContexDataModel.DataColumns.HelpPageContextId
                , drpSearchConditionHelpPageContext.SelectedValue
            );



            PerferenceUtility.UpdateUserPreference
            (
                SettingCategory
                , HelpPageDataModel.DataColumns.Name
                , txtSearchConditionName.Text
            );
        }
Exemple #20
0
 public static void UpdateSearchControlParameterVisibility(string name, string category)
 {
     PerferenceUtility.UpdateUserPreference(category, name + "Visibility", "false");
 }
Exemple #21
0
 public static void UpdateUserPreferenceForGridLines(string value)
 {
     PerferenceUtility.UpdateUserPreference("General", ApplicationCommon.SearchFilterGridLinesKey, value);
 }
Exemple #22
0
 protected override void SaveSettings()
 {
     PerferenceUtility.UpdateUserPreference(SettingCategory, FunctionalityEntityStatusDataModel.DataColumns.Functionality, drpSearchConditionFunctionality.SelectedItem.Text);
     PerferenceUtility.UpdateUserPreference(SettingCategory, "GroupBy", ddlGroupBy.SelectedItem.Text);
     PerferenceUtility.UpdateUserPreference(SettingCategory, "SubGroupBy", ddlSubGroupBy.SelectedItem.Text);
 }
Exemple #23
0
 protected override void SaveSettings()
 {
     PerferenceUtility.UpdateUserPreference(SettingCategory,
                                            SuperKeyDetailDataModel.DataColumns.SuperKeyId,
                                            drpSearchConditionSuperKey.SelectedItem.Text);
 }
Exemple #24
0
 protected override void SaveSettings()
 {
     PerferenceUtility.UpdateUserPreference(SettingCategory,
                                            SystemDevNumbersDataModel.DataColumns.PersonId,
                                            drpSearchConditionPerson.SelectedItem.Text);
 }