/// <summary> /// Gets the table. /// </summary> /// <param name="type">The type.</param> /// <param name="box">The box.</param> /// <returns></returns> public ITable GetTable(TextBox box) { switch (box.Name) { case "TextBoxCustomer": return(SelectionTablePersons.Create( box, new SelectionType(PersonTypeColection.customerTuple), dataSet.BD09_PERSON, dataSet.BD06_ORG_EINHEIT_TBL)); case "TextBoxChief": return(SelectionTablePersons.Create(box, new SelectionType(PersonTypeColection.chiefTuple), dataSet.BD09_PERSON, dataSet.BD06_ORG_EINHEIT_TBL)); case "TextBoxEngineeringAST": return(SelectionTablePersons.Create(box, new SelectionType(PersonTypeColection.engineeringTuple), dataSet.BD09_PERSON, dataSet.BD06_ORG_EINHEIT_TBL)); case "TextBoxCustomerOE": return(SelectionTableDepartaments.Create(box, dataSet.BD06_ORG_EINHEIT_TBL, new SelectionType(PersonTypeColection.customerOETuple))); case "TextBoxSeries": return(SelectionTableSeries.Create(box, dataSet.BD12_BAUREIHE, new SelectionType(PersonTypeColection.seriesTuple))); default: return(null); } }
/// <summary> /// Creates the specified text box. /// </summary> /// <param name="textBox">The text box.</param> /// <param name="personType">Type of the person.</param> /// <param name="sourceTable">The source table.</param> /// <param name="selectTable">The select table.</param> /// <returns></returns> /// <exception cref="Exception">Object already created</exception> public static SelectionTablePersons Create(TextBox textBox, SelectionType personType, DataTable sourceTable, DataTable selectTable) { return((mInstance == null) ? mInstance = new SelectionTablePersons(textBox, personType, sourceTable, selectTable) : null); }
/// <summary> /// Deletes the instance. /// </summary> public void DeleteInstance() { mInstance = null; }