/// <summary> /// Gets the form detail. /// </summary> /// <returns></returns> protected override FrmXtraBaseTreeDetail GetFormDetail() { try { _accountPresenter.Display(PrimaryKeyValue); //LinhMC comment ---21.06.2014 //FormDetail = IsInventoryItem ? "FrmXtraOpeningInventoryEntryDetail" : "FrmXtraOpeningAccountEntryDetail"; //var typeOfForm = Assembly.GetExecutingAssembly().GetType(NamespaceForm + "." + FormDetail); //return typeOfForm != null ? (FrmXtraBaseTreeDetail)Activator.CreateInstance(typeOfForm) : null; if (IsInventoryItem) { return(new FrmXtraOpeningInventoryEntryDetail()); } if (IsFixedAsset) { XtraMessageBox.Show(string.Format(ResourceHelper.GetResourceValueByName("ResAccountOpenFixedAsset"), AccountCode), ResourceHelper.GetResourceValueByName("ResDetailContent"), MessageBoxButtons.OK, MessageBoxIcon.Information); return(new FrmXtraOpeningFixedAssetEntryDetail()); } return(new FrmXtraOpeningAccountEntryDetail()); } catch (Exception ex) { XtraMessageBox.Show(ex.Message, ResourceHelper.GetResourceValueByName("ResExceptionCaption"), MessageBoxButtons.OK, MessageBoxIcon.Error); return(null); } }
/// <summary> /// Gets the form detail. /// </summary> /// <returns>FrmXtraBaseTreeDetail.</returns> protected override FrmXtraBaseTreeDetail GetFormDetail() { _accountPresenter.Display(PrimaryKeyValue); if (DetailByFixedAsset) { XtraMessageBox.Show(string.Format(ResourceHelper.GetResourceValueByName("ResAccountOpenFixedAsset"), AccountNumber), ResourceHelper.GetResourceValueByName("ResDetailContent"), MessageBoxButtons.OK, MessageBoxIcon.Information); //return new FrmOpeningFixedAssetEntryDetail(); return(null); } return(new FrmOpeningAccountEntryDetail()); }
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; }
protected override void InitData() { _accountsPresenter.Display(); _accountCategoryPresenter.Display(); if (KeyValue != null) { _accountPresenter.Display(KeyValue); _currentCode = AccountNumber; } else { if (CurrentNode != null) { txtAccountCode.Text = ((AccountModel)CurrentNode).AccountNumber; //txtAccountName.Text = @"Tài khoản mới"; this.ParentId = ((AccountModel)CurrentNode).AccountId; this.AccountCategoryId = ((AccountModel)CurrentNode).AccountCategoryId; this.AccountCategoryKind = ((AccountModel)CurrentNode).AccountCategoryKind; //grdLookUpParentID.Text = ((AccountModel)CurrentNode).AccountNumber; // cboBalanceSide.EditValue = ((AccountModel) CurrentNode).AccountCategoryKind; } } }