private void GenerateOneUserAndContainerSnapshot(ISCUserContainerObject container)
        {
            SchemaObjectBase obj = container as SchemaObjectBase;

            string objName     = obj.Properties.GetValue("Name", string.Empty);
            string description = string.Format("对象\"{0}\"({1})", objName, obj.ID);

            ProcessProgress.Current.StatusText = string.Format("正在生成\"{0}\"({1})所包含的用户",
                                                               objName, obj.Schema.Name);

            ProcessProgress.Current.Response();
            try
            {
                SchemaObjectCollection currentUsers = container.GetCurrentUsers();

                SchemaObjectCollection calculatedUsers = this.Calculate(SCConditionAdapter.Instance.Load(obj.ID), description);

                currentUsers.Merge(calculatedUsers);

                ProcessProgress.Current.StatusText = string.Format("正在提交\"{0}\"({1})的生成结果", objName, obj.Schema.Name);

                ProcessProgress.Current.MaxStep += calculatedUsers.Count;
                ProcessProgress.Current.Response();

                ConditionCalculateResultAdapter.Instance.Update(obj.ID, calculatedUsers);
                UserAndContainerSnapshotAdapter.Instance.Merge(obj.ID, obj.SchemaType, currentUsers);
            }
            catch (System.Exception ex)
            {
                string exPrefix = string.Format("生成{0}时所包含的用户出错:", description);
                ProcessProgress.Current.Error.WriteLine("{0}: {1}", exPrefix, ex.ToString());
            }
            finally
            {
                ProcessProgress.Current.Increment();
                ProcessProgress.Current.Response();
            }
        }
		private void GenerateOneUserAndContainerSnapshot(ISCUserContainerObject container)
		{
			SchemaObjectBase obj = container as SchemaObjectBase;

			string objName = obj.Properties.GetValue("Name", string.Empty);
			string description = string.Format("对象\"{0}\"({1})", objName, obj.ID);

			ProcessProgress.Current.StatusText = string.Format("正在生成\"{0}\"({1})所包含的用户",
				objName, obj.Schema.Name);

			ProcessProgress.Current.Response();
			try
			{
				SchemaObjectCollection currentUsers = container.GetCurrentUsers();

				SchemaObjectCollection calculatedUsers = this.Calculate(SCConditionAdapter.Instance.Load(obj.ID), description);

				currentUsers.Merge(calculatedUsers);

				ProcessProgress.Current.StatusText = string.Format("正在提交\"{0}\"({1})的生成结果", objName, obj.Schema.Name);

				ProcessProgress.Current.MaxStep += calculatedUsers.Count;
				ProcessProgress.Current.Response();

				ConditionCalculateResultAdapter.Instance.Update(obj.ID, calculatedUsers);
				UserAndContainerSnapshotAdapter.Instance.Merge(obj.ID, obj.SchemaType, currentUsers);
			}
			catch (System.Exception ex)
			{
				string exPrefix = string.Format("生成{0}时所包含的用户出错:", description);
				ProcessProgress.Current.Error.WriteLine("{0}: {1}", exPrefix, ex.ToString());
			}
			finally
			{
				ProcessProgress.Current.Increment();
				ProcessProgress.Current.Response();
			}
		}