protected override void InitData() { AccountingObjectCategories = new ObjectGeneral().GetAccountingObjectCategories(true, false, true, true); if (KeyValue != null) { switch (AccountingObjectCategoryId) { case 0: _vendorPresenter.Display(KeyValue); break; case 2: _accountingObjectPresenter.Display(Convert.ToInt32(KeyValue)); break; case 3: _customerPresenter.Display(KeyValue); break; } } else { //txtAcountingObjectCode.Text = GetAutoNumber(); } BankId = null; }
/// <summary> /// Initializes the data. /// </summary> protected override void InitData() { if (KeyValue != null) { _customerPresenter.Display(KeyValue); } _banksPresenter.DisplayActive(); }
/// <summary> /// Checks for new customer or edit existing customer. /// After that it displays customer data. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormCustomer_Load(object sender, EventArgs e) { // Check if this a new customer or existing one if (CustomerId == 0) { this.Text = "New Customer"; } else { this.Text = "Edit Customer"; } _customerPresenter.Display(CustomerId); }