id_author | name
-------------------------
1 | Иванов И. И.
2 | Петров П. П.
3 | Сидоров С. С.
id_book | title
-------------------------
1 | Учебник MySQL
2 | Учебник PHP
id_author | id_book
------------------------
1 | 1
2 | 1
2 | 2
3 | 2
не могу найти ничего по созданию простых сайтов без тонны зависимостей от пакетов NPM.
public class AccountType {
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("title")]
public string Title { get; set; }
}
public class Balance {
[JsonPropertyName("amount")]
public decimal Amount { get; set; }
[JsonPropertyName("currency")]
public int Currency { get; set; }
}
public class Account {
[JsonPropertyName("alias")]
public string Alias { get; set; }
[JsonPropertyName("fsAlias")]
public string FsAlias { get; set; }
[JsonPropertyName("bankAlias")]
public string BankAlias { get; set; }
[JsonPropertyName("title")]
public string Title { get; set; }
[JsonPropertyName("type")]
public AccountType Type { get; set; }
[JsonPropertyName("hasBalance")]
public bool HasBalance { get; set; }
[JsonPropertyName("balance")]
public Balance Balance { get; set; }
[JsonPropertyName("currency")]
public int Currency { get; set; }
}
public class AccountsInfo {
[JsonPropertyName("accounts")]
public Account[] Accounts { get; set; }
}
var data = JsonSerializer.Deserialize<AccountsInfo>(json);
data.Accounts[0].Balance.Amount; //баланс первого счёта
class TextBoxWithPlaceholder : TextBox
{
public string Placeholder { get; set; }
protected override void OnCreateControl()
{
base.OnCreateControl();
if (!DesignMode)
{
Text = Placeholder;
}
}
protected override void OnLostFocus(EventArgs e)
{
base.OnLostFocus(e);
if (Text.Equals(string.Empty))
{
Text = Placeholder;
}
}
protected override void OnGotFocus(EventArgs e)
{
base.OnGotFocus(e);
if (Text.Equals(Placeholder))
{
Text = string.Empty;
}
}
}
SELECT record.id, count(*)
FROM record
JOIN record_tags ON (record_tags.record_id = record.id)
WHERE record_tags.tag_id IN (1,2,3) GROUP BY 1 ORDER BY 2 DESC