protected virtual void ExecuteServiceCommand(MdxQueryArgs query_args, ServiceCommandType actionType)
		{
			if (query_args != null)
			{
				IsWaiting = true;
				LogManager.LogInformation(this, this.Name + " - Service command: " + actionType.ToString());
				OlapDataLoader.LoadData(query_args, actionType);
			}
		}
		protected virtual void ExecuteMemberAction(MdxQueryArgs query_args, PerformMemberActionArgs args)
		{
			if (args != null && query_args != null)
			{
				IsWaiting = true;

				LogManager.LogInformation(this, this.Name + String.Format(" - {0} member {1}", args.Action.ToString(), args.Member != null ? args.Member.UniqueName : "<null>"));
				OlapDataLoader.LoadData(query_args, args);
			}
		}
		void RunUpdateCubeCommand(IEnumerable<UpdateEntry> entries)
		{
			if (String.IsNullOrEmpty(UpdateScript))
			{
				LogManager.LogError(this, String.Format(Localization.ControlSettingsNotInitialized_Message, Localization.UpdateScript_PropertyDesc));
				return;
			}

			String cubeName = String.Empty;
			String connectionString = String.Empty;
			if (m_CSDescr != null)
			{
				cubeName = m_CSDescr.CubeName;
				connectionString = m_CSDescr.Connection.ConnectionString;
			}

			IsWaiting = true;

			MdxQueryArgs args = new MdxQueryArgs();
			args.Connection = Connection;
			args.Type = QueryTypes.Update;
			args.Queries = new List<string>(DataManager.BuildUpdateScripts(cubeName, entries));
			LogManager.LogInformation(this, this.Name + " - Update cube started.");
			OlapDataLoader.LoadData(args, entries);

			//UpdateCubeArgs args = CommandHelper.CreateUpdateCubeArgs(connectionString, cubeName, entries);
			//args.Script = DataManager != null ? DataManager.UpdateScript : String.Empty;
			//IsWaiting = true;
			//OlapDataLoader.LoadData(args, args);
		}
        void m_btnState_Click(object sender, RoutedEventArgs e)
        {
            if (Type != TransactionStateActionTypes.None)
            {
                MdxQueryArgs args = new MdxQueryArgs();
                args.Connection = Connection;

                switch (Type)
                { 
                    case TransactionStateActionTypes.Commit:
                        args.Queries.Add("COMMIT TRANSACTION");
                        args.Type = QueryTypes.CommitTransaction;
                        LogManager.LogInformation(this, this.Name + " - COMMIT TRANSACTION");
                        break;
                    case TransactionStateActionTypes.Rollback:
                        args.Queries.Add("ROLLBACK TRANSACTION");
                        args.Type = QueryTypes.RollbackTransaction;
                        LogManager.LogInformation(this, this.Name + " - ROLLBACK TRANSACTION");
                        break;
                }

                OlapDataLoader.LoadData(args, args);
            }
        }
 public static MdxQueryArgs CreateMdxQueryArgs(String connectionString, String query)
 {
     MdxQueryArgs args = new MdxQueryArgs();
     args.Connection = connectionString;
     args.Type = QueryTypes.Select;
     args.Queries.Add(query);
     return args;
 }
 public static MdxQueryArgs CreateMdxQueryArgs(String connectionString, String query)
 {
     MdxQueryArgs args = new MdxQueryArgs();
     args.Connection = connectionString;
     args.Query = query;
     return args;
 }