Example #1
0
        public static string ManageRight(NameValueCollection querystring)
        {
            int  intParser;
            bool boolParser;

            UserProfile userProfile = WebCommon.GetUserProfile();

            var right = new Right
            {
                RightID     = int.TryParse(querystring.Get("RightID"), out intParser) ? intParser : 0,
                Description = querystring.Get("Description"),
                CanAdd      = bool.TryParse(querystring.Get("CanAdd"), out boolParser) && boolParser,
                CanUpdate   = bool.TryParse(querystring.Get("CanUpdate"), out boolParser) && boolParser,
                CanDelete   = bool.TryParse(querystring.Get("CanDelete"), out boolParser) && boolParser,
                ViewOnly    = bool.TryParse(querystring.Get("ViewOnly"), out boolParser) && boolParser,
                UserID      = userProfile.UserId
            };

            string isInsert = querystring.Get("TransType");
            string param    = WebCommon.ToXML(right);

            return(RightDAL.ManageRight(param, isInsert));
        }
Example #2
0
        public static List <Right> GetRights(NameValueCollection querystring)
        {
            string criteria = querystring.Get("Criteria");

            return(RightDAL.GetRight(criteria));
        }