コード例 #1
0
 private void setCodeList()
 {
     try
     {
         List <CodeList> list = new CodeListDao().list();
         unitCbb.DisplayMemberPath = "description";
         unitCbb.SelectedValuePath = "code";
         unitCbb.ItemsSource       = list;
     }
     catch (Exception ex)
     {
         new AlertBox(ex.Message).ShowDialog();
     }
 }
コード例 #2
0
ファイル: InvoiceItem.xaml.cs プロジェクト: weerawud/etax
        private void init()
        {
            try
            {
                List <ItemObj> itemList = new ItemDao().list();
                itemNameCbb.DisplayMemberPath = "name";
                itemNameCbb.SelectedValue     = "id";
                itemNameCbb.ItemsSource       = itemList;

                List <CodeList> codeList = new CodeListDao().list();
                unitCbb.DisplayMemberPath = "description";
                unitCbb.SelectedValuePath = "code";
                unitCbb.ItemsSource       = codeList;
            }
            catch (Exception ex)
            {
                new AlertBox(ex.Message).ShowDialog();
            }
        }