public bool SetData (CommonDataBase.DataBase DataBase, Object Sender, String Bereich, DataSet SchemaDataSet, TableContentDefinition [] TableContentDefinitions, TableLayoutDefinition TableLayoutDefinitions) { m_TableLayoutDefinition = TableLayoutDefinitions; bool ReturnCode = m_CommonUserInterface.SetData (DataBase, Sender, Bereich, SchemaDataSet, TableContentDefinitions, TableLayoutDefinitions); m_CommonUserInterface.GetReadableTextForEntryCall += new GetReadableTextForEntryEvent (m_CommonUserInterface_GetReadableTextForEntryCall); return ReturnCode; }
public bool SetData (CommonDataBase.DataBase DataBase, Object Sender, String Bereich, DataSet SchemaDataSet, TableContentDefinition [] TableContentDefinitions, TableLayoutDefinition TableLayoutDefinition) { m_Bereich = Bereich; m_SchemaDataSet = SchemaDataSet; m_TableContentDefinitions = TableContentDefinitions; m_TableLayoutDefinition = TableLayoutDefinition; if (DataBase != null) m_DataBase = DataBase; else m_DataBase = new DataBase (); 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 (Microsoft.Windows.Controls.DataGrid)) { Microsoft.Windows.Controls.DataGrid DataGridToProcess = (Microsoft.Windows.Controls.DataGrid) Sender; UserData = (ControlUserData)DataGridToProcess.Tag; if (DataGridToProcess.SelectedIndex == -1) { return false; } m_ActiveID = ((DataRowView)DataGridToProcess.SelectedItems [0]).Row ["ID"].ToString (); } m_RefreshmentRoutine = UserData.m_RefreshFunctionName; m_PrimaryKeyName = UserData.m_PrimaryKeyName; //SimpleDataRowWindow DataRowWindow = new SimpleDataRowWindow (); m_ProcessingDataSet = m_DataBase.GetCommonDataSet ( "Select * from " + UserData.m_TableName + " where " + m_PrimaryKeyName + " = '" + m_ActiveID + "'"); SetRowToProcess (m_ProcessingDataSet.Tables [0].Rows [0], "Bitte ändern Sie ggf. die Daten dieser " + UserData.m_TableName, UserData.m_UpdateAble); return true; }