Domanda

I'm developing a Lightswitch application that will be accessed by different users. Some background info.. When a user make some changes to one or multiple rows he/she should be able to save those changes to a "temp file", without the main data being affected. Like if you're working with an Excel document and choose "Save as", the original file will still be there. The app should be able to handle multiple of those "savings". Then the user can open of of these "savings" and apply them to the main database.

My plan to accomplish this is to have multiple rows for the same data and having columns with user data, revision etc. Tho my main concern here is how to let the user choose which "saving" to open when entering the application and then filter out the correct data. Do I need to do a custom control to accomplish this, anyone that could give me some opinions? Kinda new in the Lightswitch area.

Thanks

È stato utile?

Soluzione

I'm using Lightswitch to develop a quoting interface that implements revision control. They way I do it is to have a parent table that contains a list of all the quotes (this would be similar to an Explorer window full of Excel spreadsheets i.e. data.xls, data(1).xls, data(2).xls, etc.). Each of which has a unique ID and a revision number. The details of each revision of each quote are held in a child table that has a foreign key relationship linking it to the unique ID of a particular revision of a particular quote.

When a user logs in, they are presented with a grid view of all revisions of their quotes. When they select a particular quote revision, the unique ID of that entry is used as a parameter in all of my filter queries on the details of that quote, which are presented on a different screen.

My tables are created like this:

create table Quotes (
    "QuoteID" uniqueidentifier
        not null primary key,
    "QuoteNumber" nvarchar(8)
        not null,
    "QuoteRevStart" date
        not null,
    "QuoteRevEnd" date,
    "QuoteRevNumber" tinyint
        not null,
    "QuoteRevCurrent" bit
        not null
)

create table QuoteDetails (
    "QuoteDetailsID" uniqueidentifier default newid()
        not null primary key,
    "QuoteNo" uniqueidentifier
        not null foreign key references Quotes(QuoteID),
    "ItemNo" smallint
        not null,
    "ProductQty" smallint
        not null,
)

This is based on Type 6 Slowly Changing Dimensions database design. All of this is done with standard Lightswitch controls.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top