Lightswitch as POS
-
Monday, March 12, 2012 12:57 PM
Hi all,
I was thinking to use LS as backoffice and there should be any problem with that but now I'm thinking about creating the Point of sale in LS also...
But I'm not sure yet... What are your opinions about this topic?
My scanner is a keyboard emulator so that shouldnt be that hard to capture a barcode I suppose...
For printing tickets I'm using DevExpress Reports.
All Replies
-
Monday, March 12, 2012 1:07 PM
Hi
i want to do this and i want to share some thinks with you .
1.Does DevExpress Reports support print directly to printer i mean without preview ,users does not want that preview they want to print directly and that make the process fast than preview and then print.
2.What about Keyboard Function ,users of POS heavy use Keyboard Function .
- Edited by Sinan_MCP Monday, March 12, 2012 1:08 PM
-
Monday, March 12, 2012 1:14 PM
1. http://www.devexpress.com/Support/Center/p/Q348283.aspx Here you can find the code to print without preview.
2.
I'm having this code to capture keyboard functions:
void ArticlesOverview_ControlAvailable(object sender, ControlAvailableEventArgs e) { Control bd =(Control) e.Control; bd.Focus(); bd.KeyDown += new System.Windows.Input.KeyEventHandler(bd_KeyDown); } void bd_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { sBarcode+= e.Key.ToString(); } partial void ArticlesOverview_Created() { // Write your code here. this.FindControl("RootContentItem").ControlAvailable += new EventHandler<ControlAvailableEventArgs>(ArticlesOverview_ControlAvailable); }
-
Monday, March 12, 2012 1:57 PM
Thank you for sharing your Knowledge
1. it seem work but not as Straight forward ,note the person say the select printer window show up and that is also a delay ,you know when there is a queue of people waiting ,you must finish the work as soon as possible ,may be DevExpress will solve this in next version .
2. Dose that code work for whole screen ,i mean when i hook to F10 key and the current active control is grid dose this work .
LS is good but when i work with it i feel it is limited environment.
take look at
http://www.codeproject.com/Articles/316162/Light-Enterprise-Solution
- Edited by Sinan_MCP Monday, March 12, 2012 2:11 PM
-
Wednesday, March 14, 2012 8:19 AM
1. In my case printing is optional so you need to press a button to print a ticket.
2. I still need to test that...
-
Wednesday, March 14, 2012 11:28 AM
I made a small POS (very small!) in my LS Application. What I've done is create a full Sillverlight control for all of the screen that communicates with LS Screen. When an Item is added (by typing or using a Codebar Scanner) it adds the item to the detail grid, and focuses again the autocomplete control (I used Silverlight Toolkit Autocomplete Box). Then in my AutoComplete Box, I listen for Key strokes from the user in Autocomplete_Keydown event (F12 to save for eg).
So the key is to create a Silverlight Control that replaces all your screen. Then communicate from this Silverlight control to LS.
This article from Michael Washington http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/26/Two-Ways-To-Call-LightSwitch-From-a-Custom-Silverlight-Control.aspx helped me a lot.
Like Yann Said : "If you found this post helpful, please "Vote as Helpful". If it actually answered your question, remember to "Mark as Answer". This will help people find the answers that they're looking for more quickly."
- Proposed As Answer by Nadjib Bait Wednesday, March 14, 2012 11:28 AM
- Marked As Answer by Allen Li - MSFTModerator Monday, March 19, 2012 1:55 AM

