示例#1
0
        public Dictionary <string, string> GetUserTaskParameters(long userTaskId)
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            foreach (var item in UserTaskParameters.Where(p => p.UserTaskId == userTaskId && p.Deleted == false))
            {
                parameters.Add(item.Key, item.Value);
            }

            return(parameters);
        }
示例#2
0
        public UserTaskParameter UpdateTaskParameter(long userTaskId, string key, string value)
        {
            UserTaskParameter parameter = UserTaskParameters.Where(p => p.UserTaskId == userTaskId && p.Key == key && p.Deleted == false).SingleOrDefault();

            if (parameter == null)
            {
                parameter = new UserTaskParameter();
                UserTaskParameters.Add(parameter);
            }

            parameter.UserTaskId = userTaskId;
            parameter.Key        = key;
            parameter.Value      = value;
            return(parameter);
        }