private async void ValidateBtn_Click(object sender, EventArgs e) { clientCommand.ClientId = int.Parse(CBClient.SelectedValue.ToString()); clientCommand.Date = DateTime.Now; clientCommand.Status = "En cours"; bool success = await ClientCommand.CreateClientCommandAsync(clientCommand); foreach (ClientCommandLine clientCommandLine in clientCommand.ClientCommandLines) { bool successLine = await ClientCommandLine.CreateClientCommandLineAsync(clientCommandLine); } ClickBtn(((Button)sender).Name); }