Calendar Dropbox in Experiment Window in Anylogic - calendar

Is there a way to have a Calendar (and Time) dropdown that can be put into the Experiment (Simulation) window of Anylogic?
I have users that will input a table (database) of delivery items with date/time elements I need to compare and use during the simulation.
I know I can change the Model Time property, but the user doesn't want to have to change the underlying model in any way; he wants the Simulation interface.

There is no build-in way to do this but you should be able to use the DatePicker class for this: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/DatePicker.html

Related

how to put a record on top of list in list view based on a certain user profile, can I use apex to filter a listview? salesforce

How should I filter a list view of a custom object, if I want a certain user to see the list of records on top of the list view depending on the status of the picklist field for ex. the status is Ready then it will be on the top of the list if the user is for ex. Sales Executive. any ideas on how to do this? can I use apex to filter a listview?
You can use the List View filters for status and Sharing Setting Feature provided in the standard listview, and choose the option Share list view with groups of users where you can have the option to choose multiple
Public groups or
Roles or
Roles and Subordinates
You can use any of them or all of them.
But if the constraint of your problem is not applicable to the standard way then I suggest you can create a custom list view with help of Apex and Aura Component List view or Lightning Web Component List view.
Let me know if it helps you out or not.
Thanks.
I'd try to do it without any code. Make a formula field (type = number, name = Sort Order?) and do whatever you need in that field. You can reference other fields on the record but also things like $Profile.Name. It'd still be user's job to sort by this field but you know... you can lead the horse to water but you can't make it drink ;)
Another way would be some Einstein scoring stuff, like all the demos where they're rating hot leads, opportunities most likely to close?
Have you considered making a report + dashboard? They'd see nice chart of top 10 records and they could drill down to a report where you control the sorting.
If you really feel need to code something... Yes, Apex would be able to pull up to 10K records from a listview, you need to read up about StandardSetController and setFilterId. But it'll really be limited to first 10K and then you apply your sorting/filtering on top of that. If there's important record after this 10K you might miss it.

there is some way to change the text of the days in a calendar?

By default, in the days of calendar it is shown the day of the month, but I would like to modify the calendar to be able to show more text, like the events of the day.
I have serach on internet and I have found examples how to create a new control, but I would like to know if it is a way to modify the estandar control to show this information.
Thanks.
If you want to customize the Data displayed in a Datepicker- or Calendarcontrol you need to modify its control template.
This is the way to go if you want to extend any WPF Control.
You can find information on how to specifity modify the calendar control here.

How to maintain volatile state in a winforms DB application where validation is required?

I am just starting to develop a C# winforms application which is to have a SQL back-end. I have classes for the user interface which allow the user to enter data. However there will also be validation, some options are conditional on other options, and on the forms there will be some read-only fields implemented using labels. A good example of the latter is when the user enters a discount rate and a price and it displays the discounted price.
I have business logic classes for the data objects. Would you:
Instantiate these only at the point of saving and loading to/from
the database, and hold state in the properties of the controls OR
Keep the business logic objects constantly in memory and update them
whenever the user enters/edits information?
Option 2 sounds like hard work as you have to handle everything changing on your forms. However, since you have an object in existence you can use that object to do the validation/calculations. You can call the DiscountedPrice property, for example.
An object in the business logic layer will exist all the time, I have chosen option 2. I will bind the object to the controls like this:
textBox1.DataBindings.Add("Text", example, "Datum");
Where Text is the Text property of a text box, and example.Datum is the property of the object in the business logic layer.
Those read-only fields on the form can then be implemented via properties of the object in the business logic layer. This means I can keep the logic out of the UI layer.

Which Control to use in an Invoice System

I need help regarding my project:
I am trying to make a Billing system like this
https://www.youtube.com/watch?v=cKDvSnL1nFE
but a windows desktop application.
the idea is: when the user enters product code/Id it it retrieves the products and associated information (i.e product name and price) from the database and adds in the list.
I have no idea which control to use for the list, List View or Grid View or something else.
I recommend use GridView because you have more control of your data,
then you will assign a event to cells for refresh all product information;
the event to use will be CellValueChanged.

ExtJS - Show different records from a store in different grids

Is it possible in ExtJS to display different records from a store in different grids? I have a Store containing contact information (name, department, phone number) used to populate the contacts tab of my application. My goal is to be able to add grids elsewhere in the application that display contacts from specific departments (eg a grid for everyone in the tech department, another for everyone in the sales department). However, when I attach a filter, the filter seems to apply to the store itself, changing the display of all of the grids to the last version I try to load.
Do I need to create child grids and sync them to make this work?
No, it is not possible. The store gets filtered, not the grid itself. You do have to create multiple stores and assign a different one to every grid.
Another way to say it is that store (when used with a grid) is a ViewModel, that is, a model that is kept in sync with the view. Therefore, the same store can't be used for multiple views as you would expect.
No, but if you need a work-around, use same store for all the grids and filter store on grid's aftererender listener. But if you use these grids on tab then you need to do it on viewready event. Anyway, using same store for multiple grids will not be a good idea. Think twice before use.

Resources