protected override void InitData() { var objectGeneral = new ObjectGeneral(); PayItemCodes = objectGeneral.GetPayItemCodes(); Types = objectGeneral.GetPayItemTypes(); _globalVariable = new GlobalVariable(); _accountsPresenter.DisplayActive(); _budgetItemsPresenter.DisplayActive(); _budgetSourcesPresenter.DisplayActive(); if (KeyValue != null) { _payItemPresenter.Display(KeyValue); } else { CreditAccountCode = _globalVariable.CurrencyCodeOfSalary == @"USD" ? @"11121" : "11122"; } if (ActionMode == ActionModeEnum.Edit) { lookUpPayItemCode.Enabled = false; } memoDescription.Enabled = false; }
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; }
protected override void InitData() { Rates = new ObjectGeneral().GetMutualStates(); if (KeyValue != null) { _mutualPresenter.Display(KeyValue); } else { txtMutualCode.Text = GetAutoNumber(); } }
protected override void InitData() { CostMethods = new ObjectGeneral().GetCostMethods(); this.InventoryItemTypes = this.InventoryItemTypes; _departmentsPresenter.DisplayActive(); _currenciesPresenter.DisplayActive(); _accountsPresenter.DisplayActive(); if (KeyValue != null) { _inventoryItemPresenter.Display(KeyValue); } else { txtInventoryItemCode.Text = GetAutoNumber(); } }
public string GetRadarString(Radar radar) { string result = string.Empty; FormDisplay display = null; DataFrameMessages infos = null; if (radar != null && (display = this.DictForms[radar]) != null && (infos = display.Infos) != null) { ObjectGeneral obj = infos.ObjectMostThreat; result = string.Format(@" ""radar_{0}"": [ ""effective"": {1}, ""distance"": {2}, ""threat"": {3} ],", radar.PortLocal + "_" + radar.Name /*radar.Id*/, infos.RadarState.Working, obj == null ? 0 : obj.DistanceToBorder, obj == null ? 0 : obj.ThreatLevel); } return(result); }
protected override void InitData() { PlanTypes = new ObjectGeneral().GetPlanTypes(); // get plan template lists if (PlanType == 0) { _planTemplateListsPresenter.DisplayByReceipt(); } else { _planTemplateListsPresenter.DisplayByPayment(); } // get budget item lists if (PlanType == 0) { _budgetItemsPresenter.DisplayActive(); //.DisplayIsReceiptForEstimate(); } else { _budgetItemsPresenter.DisplayIsPaymentForEstimate(); } // get plan template list by keyvalue if (KeyValue != null) { _planTemplateListPresenter.Display(KeyValue); } else { PlanTemplateItems = new List <PlanTemplateItemModel>(); } //get init checked and plan template list name if (ParentId == null) { chkCheck.Checked = false; grdPlanTemplateList.Enabled = false; } else { chkCheck.Checked = true; } //LINHMC - 20/8/2015 //Nếu mẫu chứng từ đã tồn tại, không cho bố con thằng nào sửa những cái không được sửa var isExisted = _planTemplateItemsPresenter.CheckConstraintData(PlanTemplateListId); txtPlanTemplateItemCode.Enabled = !isExisted; cboPlanType.Enabled = !isExisted; spnPlanYear.Enabled = !isExisted; grdPlanTemplateList.Enabled = !isExisted; gridViewDetail.OptionsBehavior.Editable = !isExisted; barButtonDeleteRowItem.Enabled = !isExisted; grdPlanTemplateList.Enabled = chkCheck.Checked; if (PlanType == 0) { chkCheck.Enabled = false; grdPlanTemplateList.Enabled = false; } else { chkCheck.Enabled = !isExisted; } }