私のシナリオ:
私は、GUIからクラスを追加し、そのクラスをセクションにリンクする必要があるWindowsフォームアプリケーションで学校管理システムを実行しています(どのクラスにどのセクションがあるかが表示されます)。そのために、セクションからセクションをロードして、それらを表示したいチェックボックスで、ユーザーが追加するクラスのセクションを選択できるようにします。
問題 :
新しいクラスのセクションを簡単に選択できるチェックボックスにセクションを表示できません
私が欲しいもの:
読み込んでいるセクションをチェック ボックスの形式で表示する必要があります。
私のコード:
try
{
Sections objSections = new Sections();
objSections.LoadAll();
if (objSections.RowCount > 0)
{
List<CheckBox> Sectionlist=new List<CheckBox>();
for (int i = 0; i < objSections.RowCount; i++)
{
Sectionlist.Add(objSections.Name); // here is error "Some invalid arguments"
}
}
else
{
DevComponents.DotNetBar.MessageBoxEx.Show(" No Section Found, Please Add some Section And linke them with Classes. ", " Information Message! ");
return;
}
}
catch (Exception ee)
{
DevComponents.DotNetBar.MessageBoxEx.Show(ee.Message);
return;
}