私はGridViewを持っています 1 つの列はCheckBoxList(月、火、水、木、金、土、日) です
選択した週のデータ:
- 「1101000」の意味(月・火・木を選択)
- 「1000000」の意味(月を選択)
- 「0100000」の意味(火が選択されている)
以下は、選択したアイテムを識別するために使用されます
Boolean isMonday = false;
Boolean isTuesday = false;
Boolean isWednesday = false;
Boolean isThursday = false;
Boolean isFriday = false;
Boolean isSaturday = false;
Boolean isSunday = false;
if (alertDayInt >= 1000000)
{
isMonday = true;
alertDayInt -= 1000000;
}
else if (alertDayInt >= 100000)
{
isTuesday = true;
alertDayInt -= 100000;
}
else if (alertDayInt >= 10000)
{
isWednesday = true;
alertDayInt -= 10000;
}
else if (alertDayInt >= 1000)
{
isThursday = true;
alertDayInt -= 1000;
}
else if (alertDayInt >= 100)
{
isFriday = true;
alertDayInt -= 100;
}
else if (alertDayInt >= 10)
{
isSaturday = true;
alertDayInt -= 10;
}
else if (alertDayInt >= 1)
{
isSunday = true;
alertDayInt -= 1;
}