public void createEquipeTable() { EquipeMember eMember = new EquipeMember(); StringBuilder sbElements = new StringBuilder(); { bool justCreated = true; foreach (sqliteBase sElement in eMember.values) { if (justCreated) { justCreated = false; } else { sbElements.Append(", "); } sbElements.Append(sElement.valueName + " " + sElement.dataType); } } string sql_command = "CREATE TABLE " + equipeTable + " ( " + sbElements.ToString() + ")"; SQLiteCommandsExecuter.executeNonQuery(sql_command, Core.AppCore.dCore.M_dbConnection); }
private void UIBtOK_Click(object sender, RoutedEventArgs e) { EquipeMember eMember = new EquipeMember(); eMember.name.value = UITbUserName.Text; Core.AppCore.dCore.EquipeMemberManager.addMember(eMember); this.DialogResult = true; }
public void addMember(EquipeMember eMember) { Request.RequestBuilder rb = new Request.RequestBuilder(equipeTable); rb.addElement(eMember.name.valueName, eMember.name.value); SQLiteCommand cmd = Request.CommandBuilder.getCommand(rb, Core.AppCore.dCore.M_dbConnection); cmd.ExecuteNonQuery(); }
public List <EquipeMember> getEquipeFromReader(SQLiteDataReader reader) { List <EquipeMember> equipeMemeber = new List <EquipeMember>(); while (reader.Read()) { EquipeMember mb = new EquipeMember(); mb.name.value = reader[mb.name.valueName].ToString(); mb.elementID.value = int.Parse(reader[mb.elementID.valueName].ToString()); equipeMemeber.Add(mb); } return(equipeMemeber); }
public PersonView(EquipeMember eMemb) { InitializeComponent(); EquipeMember = eMemb; LoadElement(); }
public void deleteEquipeMember(EquipeMember member) { deleteEquipeMember(member.elementID.value); }