Exemple #1
0
        /// <summary>
        /// Initializes the data.
        /// </summary>
        protected override void InitData()
        {
            _budgetItemsPresenter.DisplayActive(true);

            if (KeyValue != null)
            {
                _budgetItemPresenter.Display(KeyValue);
                CurrentBudgetItemCode = BudgetItemCode;
            }
            else
            {
                if (CurrentNode != null)
                {
                    txtBudgetItemCode.Text          = ((BudgetItemModel)CurrentNode).BudgetItemCode;
                    grdLookUpEditParentId.EditValue = ((BudgetItemModel)CurrentNode).BudgetItemId;
                    if (((BudgetItemModel)CurrentNode).BudgetItemType < 3 ||
                        ((BudgetItemModel)CurrentNode).BudgetItemType > 0)
                    {
                        cboBudgetItemType.SelectedIndex = ((BudgetItemModel)CurrentNode).BudgetItemType + 1;
                    }
                    else
                    {
                        cboBudgetItemType.SelectedIndex = ((BudgetItemModel)CurrentNode).BudgetItemType;
                    }
                }
                else
                {
                    grdLookUpEditParentId.ItemIndex = 0;
                }
            }
        }
Exemple #2
0
 protected override void InitData()
 {
     if (KeyValue != null)
     {
         _budgetItemPresenter.Display(KeyValue);
     }
     else
     {
         if (CurrentNode != null)
         {
             txtBudgetItemCode.Text = ((BudgetItemModel)CurrentNode).BudgetItemCode;
             txtBudgetItemName.Text = ((BudgetItemModel)CurrentNode).BudgetItemName;
         }
     }
     _budgetItemsPresenter.Display();
 }