public void PayToken(string token, TokenPaymentDto dto) { connection.Open(); string sql = $"INSERT INTO {token_payment_table}({token_payment_token_column}, {token_payment_function_column}, {token_payment_day1_column}, {token_payment_day2_column}) " + $"VALUES( '{token}','{dto.data}', '{dto.Date1.ToString("yyyy-M-dd HH:mm:ss")}', '{dto.Date2.ToString("yyyy-M-dd HH:mm:ss")}')"; MySqlCommand command = new MySqlCommand(sql, connection); command.ExecuteNonQuery(); connection.Close(); }
void IPolyclinicService.PayToken(TokenPaymentDto tokenDto) { var token = tokenManager.FindOrAddToken(); tokenManager.PayToken(token, tokenDto); }