Exemplo n.º 1
0
        private void popupWindowShowActionMovsCta_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e)
        {
            Bancaria obj = View.CurrentObject as Bancaria;

            Type                 objectType       = typeof(MovimientoB);
            IObjectSpace         objectSpace      = Application.CreateObjectSpace();
            string               listViewId       = Application.FindListViewId(objectType);
            IModelListView       modelListView    = (IModelListView)Application.FindModelView(listViewId);
            CollectionSourceBase collectionSource = Application.CreateCollectionSource(
                objectSpace, objectType, listViewId);

            collectionSource.SetCriteria("Cuenta", $"Cuenta.Oid = '{obj.Oid}'");
            e.View = Application.CreateListView(modelListView, collectionSource, true);
        }
Exemplo n.º 2
0
        private void NewMethod()
        {
            CollectionSourceBase collectionSource = application.CreateCollectionSource(objectSpace, type, ListViewId);
            string criteria = application.Model.Views[ListViewId].GetValue <string>("Criteria");

            collectionSource.SetCriteria("Filter1", criteria);
            var count = collectionSource.GetCount();

            this.label1.Text = count.ToString();
            if (count > 0 && ShowColor)
            {
                this.BackColor = Color.FromArgb(203, 46, 2);
            }
        }