Custom SSIS data flow component with multiple output in asp.net - asp.net

I am building a Custom SSIS data flow control which will provide three out put flow based on some rules validation. Please help me what exactly I need to implement in ProcessInput method to redirect data in these three output based on the some logic applied on the input

If I understand correctly, I think you want to route each 1 of the 3 outputs from the Custom Control component shown in your data flow, to various different destinations based on conditions. For that, you could use a CONDITIONAL SPLIT Component as shown below.
You can split the input into 2 or more row streams by giving the CONDITIONAL SPLIT various conditions that look at column values etc.
If my understanding is incorrect, then please update your question with more details on your situation.

Related

How to split a complex hierarchical Model into two partial Views?

I'm learning the Model/View paradigm of Qt because it seems very well suited to edit the data structures I have to deal with, such as this one:
Addition
|_QuadraticFunction
| |_intercept=0.2
| |_slope=0.0
| |_quadratic=1.2
|_Multiplication
|_LinearFunction
| |_intercept=0.0
| |_slope=-8.9
|_Gaussian
|_center=0.6
|_sigma=0.4
My data structure is made up of a combination of functions, each function has its own properties. However, I don't want to display the whole data structure in a single TreeView because it can get too long for complicated structures. Instead, I want to show one view including only the function names, and other view showing only the properties of the function selected in the previous view by the user with a click of the mouse, like this:
(FunctionsView, the first View)
Addition
|_QuadraticFunction
|_Multiplication
|_**LinearFunction**
|_Gaussian
(selectedFunctionView, the second View)
intercept 0.0
slope -8.9
In this example, the user clicked on LinearFunction in the first View, and the second View automatically showed its properties.
My question is: can I hold all my data structure (function names and function properties) under a single model and then have two Views that display only parts of the model like above? If not, do I have to create one model for each partial View, each model indexing different parts of the data structure? Please help, I'm inexperienced with this.
.Jose
Yes, you can absolutely keep it all in one model with two different views. You'll probably want to look into a QSortFilterProxyModel; you would have one of these for each view. The proxy applies sorting and filtering--and filtering is what you're doing here--to a more complete model. When you select something in the main view, you'll want to issue a signal that's picked up by the other proxy model (or the other view and passed to its proxy), and then refilter based on the newly selected item. It's actually very easy to use overall. The easiest mistake to make is getting confused over which model index to use because you'll have model indexes for the proxies, and model indexes for the complete model, and sometimes you have to convert between the two. The documentation is pretty clear on where that's necessary, but it helps to be extra aware of it.
Take a look at the documentation and if you have more questions, please ask.

How to create a display method that relies on two other display methods?

I have a header/lines type of object (think SalesTable/PurchTable), and on the header I have two calculated display methods, "total qty" and "total invoiced".
I want to add a simple display that says "Fully Invoiced", which is a display method that returns:
return this.TotalQty() == this.TotalInvoiced();
The issue is that calls the two display method calculations again, which could be performance hit on ListPages.
Is there a way to make a form method that uses the cached values so I don't have to call extra calculations and I don't have to create a table column?
As far as I know there is no way to access the values that have been cached for display methods in code.
You could define the display method on the table and use the existing caching mechanism. You would have to define the other two display methods totalQty and totalInvoiced on the table, too. Note that this will still result in some unnecessary calls to totalQty and totalInvoiced.
Another way would be to implement your own caching mechanism in the form by e.g. using a map that holds the RecIds and cache values (see Caching display methods on a form datasource for an example/tutorial). But if performance is more a theoretical than a practical problem, I would not recommend this approach.
A third option could be to combine the queries in totalQty and totalInvoiced into one query that is then used by the fullyInvoiced display method. This will introduce some redundancy in your code and you would still have to define fullyInvoiced on the table to leverage caching. But depending on the queries it could improve performance.

how to properly implement different views options of the same data set

I'm currently building a model view architecture and came across an issue I can't find information on across the internet.
I have one set of complex data, that I want to show to the user in two (or more) different fashions :
full data is shown
only selected (partial) information in shown
The way this data is printed is to me irrelevant, but if this help it's either in a table view (basic information) or a column view (full information). those two clases comes from QT model / view framework.
Now I though about two option to implement this and wonder the one I should use
Option 1
I build my data structure,
include it in a custom model
specialize (subclass) view classes in order to only print what I'm interrested in.
Option 2
I build my data structure,
specialize my models to only provide access to relevant data
use standart view to print it on screen.
I would honestly go for option 2, but seeing the amount of case over the internet where option 1 is used I started to wonder if I'm doing it right. (I never found any example of dual model of a data when multiple view of a model appears to be quite frequent)
Placing data relevant handling inside view classes seem wrong to me, but duplicating models of a data leads to either duplicated data (which also seems wrong) or shared data (and then model no longer 'hold' the data)
I also had a look on QT delegates, but those class are mostly meant to change the appearence of data. I didn't find a way using delegates to ignore the data that is not relevant for one view.
You are completely right thinking that it's wrong to use views for filtering data. The only reasons for reimplementing a view is to have a different view of the same data or special processing of user events.
So there are two ways to filter out a data:
1.Create two models which will share the data. It's a standard recommended approach - not to keep data in models.
2.Create one model providing all the data and create a proxy model inherited from QSortFilterProxyModel to filter out the data.
You will need to reimplement filterAcceptsColumn method to filter out columns and filterAcceptsRow to filter out rows.
Then use View-Model to show all the data or View-Proxy-Model to show some data.

add addtional summary row in smartgwt Grid

Im trying to add a summary row which sum all values in each column. I have very large data and I do pagination in the grid. However, I heard gwt doing summaryGrid in client side which does not work in my case. I tried to setShowGridSummary to true but it works only for a small set of data, it shows blank if the data is large. So I want to change the plan to add additional summary grid and then get the query from backend and insert the summary data into that grid. So my question is can I add additional row into smartgwt grid? And how?
Thanks,
On client side SmartGWT can only calculate summary if you fetched all records so only then summary values will show.
You can disable pagination and do this which I don't recommend for large data sets. Or prepare another data source that can calculate summary on server side and return only one record:
listGrid.setSummaryRowDataSource(summaryRowDataSource);
SmartGWT will make another request to server for summary row with same criteria that was used for normal fetch.
It will be also refetched any time criteria will change.

Filling data in FormView from different tables

I am using a FormView in an online quiz page for displaying the questions and RadioButtons (for answers)
online quiz using ASP dot NET
Now, I need to pick the questions according to a TestID and a particular Set of that Test. The testid and the set_number would be passed using Session variables.
I'm having 3 testIDs and 3 Sets per TestID and, thus, am using 9 tables to store the Questions, the Options and the correct answer.
I need help on how to set the FormView so that it extracts the questions from a particular table only. Do I need to use a StoredProcedure ? If yes, how?
PS: If I use only one table to store all the questions from each Set and for each TestID, I can do that, but I'd prefer using separate tables.
Update
SOLVED myself
[CLOSED]
You can make a view for gathering data from your tables. then query this view and use the returned data.

Resources