示例#1
0
 protected override void InitData()
 {
     if (KeyValue != null)
     {
         _accountPresenter.Display(KeyValue);
         _accountsPresenter.DisplayForComboTree(int.Parse(KeyValue));
         _accountCategoriesPresenter.DisplayActive();
         _banksPresenter.DisplayActive();
         if (AccountCode == "11122" || AccountCode == "11222")
         {
             cboCurrencyCode.Properties.Items.Add(_globalVariable.CurrencyLocal);
         }
         else
         {
             if (AccountCode == "11121" || AccountCode == "11221")
             {
                 cboCurrencyCode.Properties.Items.Add(_globalVariable.CurrencyAccounting);
             }
             else
             {
                 cboCurrencyCode.Properties.Items.Add(_globalVariable.CurrencyLocal);
                 if (_globalVariable.CurrencyLocal != _globalVariable.CurrencyAccounting)
                 {
                     cboCurrencyCode.Properties.Items.Add(_globalVariable.CurrencyAccounting);
                 }
             }
         }
     }
     else
     {
         _accountsPresenter.DisplayActive();
         _accountCategoriesPresenter.DisplayActive();
         _banksPresenter.DisplayActive();
         chkIsActive.Checked = true;
         cboCurrencyCode.Properties.Items.Add(_globalVariable.CurrencyLocal);
         if (_globalVariable.CurrencyLocal != _globalVariable.CurrencyAccounting)
         {
             cboCurrencyCode.Properties.Items.Add(_globalVariable.CurrencyAccounting);
         }
         cboCurrencyCode.Visible = false;
     }
     cboCurrencyCode.Visible = chkIsCurrency.Checked;
 }