Esempio n. 1
0
        public string GetActionPath(string action, IList <object> primaryKeyValues, string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                return(this.GetActionPath(action, primaryKeyValues));
            }
            RouteValueDictionary routeValues = new RouteValueDictionary();

            this.GetRouteValuesFromPK(routeValues, primaryKeyValues);
            return(QueryStringHandler.AddFiltersToPath(path, routeValues));
        }
Esempio n. 2
0
        public string GetChildrenPath(string action, object row, string path)
        {
            if (row == null)
            {
                return(string.Empty);
            }
            if (string.IsNullOrEmpty(path))
            {
                return(this.GetChildrenPath(action, row));
            }
            RouteValueDictionary routeValues = this.GetRouteValues(row);

            return(QueryStringHandler.AddFiltersToPath(path, routeValues));
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //Get the user name of the currently logged in user and decrypt it
                if (!String.IsNullOrWhiteSpace(Request.QueryString[SharedConst.QUERY_STRING_USER_NAME]))
                {
                    currentUser = Request.QueryString[SharedConst.QUERY_STRING_USER_NAME];

                    //uncomment this below line when the encryption
                    //var encryptedQueryString = Request.QueryString[SharedConst.QUERY_STRING_USER_NAME];
                    //encryptedQueryString = HttpUtility.UrlDecode(encryptedQueryString.Trim());
                    //currentUser = CryptoServiceHandler.Decrypt(currentUser, CryptoServiceHandler.ENCRYPTION_PASS_PHRASE);
                }
                else
                {
                    this.frmPenalty.Visible = false;
                }

                _qHandler = new QueryStringHandler();
                if (_qHandler.Exists(SharedConst.QUERY_STRING_USER_NAME))
                {
                    currentUser = _qHandler.GetValue(SharedConst.QUERY_STRING_USER_NAME);
                    if (!String.IsNullOrWhiteSpace(currentUser))
                    {
                        //Uncomment the below line when the cryptographics module is ready

                        //currentUser = HttpUtility.UrlDecode(Request.QueryString[SharedConst.QUERY_STRING_USER_NAME]);
                        //currentUser = CryptoServiceHandler.Decrypt(currentUser, CryptoServiceHandler.ENCRYPTION_PASS_PHRASE);
                    }
                    else
                    {
                        this.frmPenalty.Visible = false;
                    }
                }

                if (!Page.IsPostBack)
                {
                    this.hdRs.Value = SharedConst.PENALTY_TYPE_NOT_RS;

                    _penalties.BindWorkCollection(this.cmbWorkCollection);
                    this.cmbWorkCollection.Items.Insert(0, new ListItem(SharedConst.DEFAULT_DROP_DOWN_SELECTION, "0", true));

                    _penalties.BindPenalties(this.cmbPenaltyType);
                    this.cmbPenaltyType.Items.Insert(0, new ListItem(SharedConst.DEFAULT_DROP_DOWN_SELECTION, "0", true));

                    _riType.GetAllRiTypes(this.cmbRiType);
                    this.cmbRiType.Items.Insert(0, new ListItem(SharedConst.DEFAULT_DROP_DOWN_SELECTION, "0", true));

                    _penalties.BindPenaltyFrequncies(this.cmbPenaltyFrequency);
                    this.cmbPenaltyFrequency.Items.Insert(0, new ListItem(SharedConst.DEFAULT_DROP_DOWN_SELECTION, "0", true));

                    _penalties.BindFrequncies(this.cmbFrequency);
                    this.cmbPenaltyFrequency.Items.Insert(0, new ListItem(SharedConst.DEFAULT_DROP_DOWN_SELECTION, "0", true));
                }
            }
            catch (Exception ex)
            {
                LogUtitlity.LogToText(ex.ToString());
            }
        }