Exemplo n.º 1
0
		public bool DoTableHandlingStartup ()
			{
			m_TableHelper = new CVM.TableUserControlHelper ();
			m_TableHelper.TableName = TableName;
			m_TableHelper.DataBase = m_DataBase;

			m_TableHelper.SelectionWindowInstance = SelectionWindowInstance;

			m_TableHelper.FillDefaultsFromExtendedProperties ();
			LayoutDefinitionsPropertyToken = m_TableHelper.LayoutDefinitionsPropertyToken;
			SetSelectionPossible (true);
			return true;
			}
Exemplo n.º 2
0
		public CommonSelection ()
			{
			InitializeComponent ();
			m_TableHelper = new CVM.TableUserControlHelper ();
			}
Exemplo n.º 3
0
        public bool SetData(WCFStandardsNS.WCFStandards ParentsDataBase, ControlUserData UserDataParameter, DataSet SchemaDataSet,
            TableLayoutDefinition TableLayoutDefinition, String RecordIDToProcess)
            {
            m_TableHelper = new CVM.TableUserControlHelper ();
            m_TableHelper.DataBase = ParentsDataBase;
            m_Bereich = "";
            m_SchemaDataSet = SchemaDataSet;
            LayoutDefinition = TableLayoutDefinition;
            DataBase = ParentsDataBase;
	
            m_ActiveID = RecordIDToProcess;
            m_RefreshmentRoutine = UserDataParameter.m_RefreshFunctionName;
            m_PrimaryKeyName = UserDataParameter.m_PrimaryKeyName;
            m_TableHelper.TableName = UserDataParameter.m_TableName;
            m_ProcessingDataSet = DataBase.GetCommonDataSet (
                "Select * from " + UserDataParameter.m_TableName + " where " + m_PrimaryKeyName + " = '" + m_ActiveID + "'");
            if (UserDataParameter.m_UpdateAble)
                SetRowToProcess (m_ProcessingDataSet.Tables [0].Rows [0], "Bitte ändern Sie ggf. diese \""
                                                                          + UserData.m_TableName + "\" Daten", UserDataParameter.m_UpdateAble);
            else
                SetRowToProcess (m_ProcessingDataSet.Tables [0].Rows [0], "", UserData.m_UpdateAble);

            if (LayoutDefinition == null)
                {
                m_TableHelper.LayoutDefinitionsPropertyToken = "CommonUserInterfaceWindow_";
                LayoutDefinition = m_TableHelper.LayoutDefinition;
                }
            return true;
            }
Exemplo n.º 4
0
        public bool SetData(WCFStandardsNS.WCFStandards ParentsDataBase, ControlUserData UserDataParameter, DataSet SchemaDataSet,
            TableLayoutDefinition TableLayoutDefinition, DataRow RowToProcess, String Title)
            {
            m_TableHelper = new CVM.TableUserControlHelper ();
            m_TableHelper.DataBase = ParentsDataBase;
            m_Bereich = "";
            m_SchemaDataSet = SchemaDataSet;
            LayoutDefinition = TableLayoutDefinition;
            DataBase = ParentsDataBase;

            m_ActiveID = RowToProcess ["ID"].ToString ();
            m_RefreshmentRoutine = UserDataParameter.m_RefreshFunctionName;
            m_PrimaryKeyName = UserDataParameter.m_PrimaryKeyName;
            m_TableHelper.TableName = UserDataParameter.m_TableName;
            m_ProcessingDataSet = null;
            UserData = UserDataParameter;
            SetRowToProcess (RowToProcess, Title, UserDataParameter.m_UpdateAble);

            if (LayoutDefinition == null)
                {
                m_TableHelper.LayoutDefinitionsPropertyToken = "CommonUserInterfaceWindow_";
                LayoutDefinition = m_TableHelper.LayoutDefinition;
                }
            return true;
            }
Exemplo n.º 5
0
        public bool SetData (WCFStandardsNS.WCFStandards ParentsDataBase, Object Sender, String Bereich, DataSet SchemaDataSet,
            TableLayoutDefinition TableLayoutDefinition)
            {
            m_TableHelper = new CVM.TableUserControlHelper ();
            m_TableHelper.DataBase = ParentsDataBase;
            m_Bereich = Bereich;
            m_SchemaDataSet = SchemaDataSet;
            LayoutDefinition = TableLayoutDefinition;
            DataBase = ParentsDataBase;
            if (Sender.GetType () == typeof (ListBox))
                {
                ListBox ListBoxToProcess = (ListBox)Sender;
                UserData = (ControlUserData)ListBoxToProcess.Tag;
                if (ListBoxToProcess.SelectedIndex == -1)
                    {
                    return false;
                    }
                m_ActiveID = ((ListBoxItem)ListBoxToProcess.Items
                    [ListBoxToProcess.SelectedIndex]).Tag.ToString ();
                }
            if (Sender.GetType () == typeof (DataGrid))
                {
                DataGrid DataGridToProcess = (DataGrid) Sender;
                UserData = (ControlUserData)DataGridToProcess.Tag;
                if (DataGridToProcess.SelectedIndex == -1)
                    {
                    return false;
                    }
                m_ActiveID = ((DataRowView)DataGridToProcess.SelectedItems [0]).Row ["ID"].ToString ();
                }
            if (Sender.GetType () == typeof (TreeView))
                {
                TreeView TreeViewToProcess = (TreeView)Sender;
                UserData = (ControlUserData)TreeViewToProcess.Tag;
                if (TreeViewToProcess.SelectedItem == null)
                    {
                    return false;
                    }
                m_ActiveID = ((TreeViewItem)TreeViewToProcess.SelectedItem).Tag.ToString ();
                }
            m_RefreshmentRoutine = UserData.m_RefreshFunctionName;
            m_PrimaryKeyName = UserData.m_PrimaryKeyName;
            m_TableHelper.TableName = UserData.m_TableName;
            if (String.IsNullOrEmpty (m_ActiveID))
                {
                if (GetMissingIDToModifyCall != null)
                    m_ActiveID = GetMissingIDToModifyCall (UserData.m_TableName, Sender);
                if (String.IsNullOrEmpty (m_ActiveID))
                    {
                    MessageBox.Show ("In der Tabelle \"" + UserData.m_TableName + "\" war keine ID zum starten der Änderungen zu finden");
                    return false;
                    }
                }
            m_ProcessingDataSet = DataBase.GetCommonDataSet (
                "Select * from " + UserData.m_TableName + " where " + m_PrimaryKeyName + " = '" + m_ActiveID + "'");
            if (UserData.m_UpdateAble)
                SetRowToProcess (m_ProcessingDataSet.Tables [0].Rows [0], "Bitte ändern Sie ggf. diese \""
                                                                          + UserData.m_TableName + "\" Daten", UserData.m_UpdateAble);
            else
                SetRowToProcess (m_ProcessingDataSet.Tables [0].Rows [0], "", UserData.m_UpdateAble);

            if (LayoutDefinition == null)
                {
                m_TableHelper.LayoutDefinitionsPropertyToken = "CommonUserInterfaceWindow_";
                LayoutDefinition = m_TableHelper.LayoutDefinition;
                }
            return true;
            }