private void txtVat_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e) { var s = sender as TextEditor; if (s != null && s.IsLoaded && vatCache != null) { if (vatCache.GetKeyList().Contains(s.Text)) { UnicontaMessageBox.Show(string.Format("{0} {1} ", Uniconta.ClientTools.Localization.lookup("Vat"), string.Format(Uniconta.ClientTools.Localization.lookup("AlreadyExistOBJ"), s.Text)) , Uniconta.ClientTools.Localization.lookup("Warning")); } } }
async void GetInterestAndProduct() { var api = this.api; var Comp = api.CompanyEntity; InterestCache = Comp.GetCache(typeof(Uniconta.DataModel.CrmInterest)) ?? await api.LoadCache(typeof(Uniconta.DataModel.CrmInterest)); cmbInterests.ItemsSource = InterestCache?.GetKeyList(); ProductCache = Comp.GetCache(typeof(Uniconta.DataModel.CrmProduct)) ?? await api.LoadCache(typeof(Uniconta.DataModel.CrmProduct)); cmbProducts.ItemsSource = ProductCache?.GetKeyList(); Debtors = Comp.GetCache(typeof(Uniconta.DataModel.Debtor)) ?? await api.LoadCache(typeof(Uniconta.DataModel.Debtor)); Prospects = Comp.GetCache(typeof(Uniconta.DataModel.CrmProspect)) ?? await api.LoadCache(typeof(Uniconta.DataModel.CrmProspect)); Creditors = Comp.GetCache(typeof(Uniconta.DataModel.Creditor)) ?? await api.LoadCache(typeof(Uniconta.DataModel.Creditor)); Contacts = Comp.GetCache(typeof(Uniconta.DataModel.Contact)) ?? await api.LoadCache(typeof(Uniconta.DataModel.Contact)); }