private void init() { try { refList = new List <ReferenceObj>(); List <BuyerObj> buyerList = new BuyerDao().list(); nameCbb.DisplayMemberPath = "name"; nameCbb.ItemsSource = buyerList; seller = new SellerDao().select(); vatTb.Text = seller.vat.ToString("N"); this.invoiceID = PREFIX + seller.dbn_no; List <CauseCodeListObj> list = new CauseCodeListDao().list("ใบเพิ่มหนี้"); purposeCbb.DisplayMemberPath = "description"; purposeCbb.SelectedValuePath = "code"; purposeCbb.ItemsSource = list; purposeCbb.SelectedIndex = 0; otherPurposeTb.IsEnabled = false; setProvinceList(); is_main.IsChecked = true; taxIdType.SelectedIndex = 0; taxIdTypeControl(0); } catch (Exception ex) { new AlertBox(ex.Message).ShowDialog(); } }
private void init() { try { refList = new List <ReferenceObj>(); List <BuyerObj> buyerList = new BuyerDao().list(); nameCbb.DisplayMemberPath = "name"; nameCbb.ItemsSource = buyerList; seller = new SellerDao().select(); vatTb.Text = seller.vat.ToString("N"); //this.invoiceID = seller.running_prefix + seller.running_number; this.invoiceID = PREFIX + seller.inv_no; List <CauseCodeListObj> list = new CauseCodeListDao().list("ยกเลิกและออกใบกำกับภาษี ฉบับใหม่แทนฉบับเดิม"); purposeCbb.DisplayMemberPath = "description"; purposeCbb.SelectedValuePath = "code"; purposeCbb.ItemsSource = list; purposeCbb.SelectedIndex = 0; setProvinceList(); } catch (Exception ex) { new AlertBox(ex.Message).ShowDialog(); } }