sql server 2005 - how to update all clients after each db transcation -


I develop a client-server based application using WPF, SQL-Server and WCF I am here. It is basically a type of POS application (not using any POS library but features are almost identical). Server-side coding is almost complete Now I'm going into client-side coding. I'm new to WCF (the first app on WCF) and client-server architecture, so before my coding began I was surrounded by some suspicion. According to my client (person), he should be able to print the item sales bill (memos) along with the server from the client computer. Each memo should have a memo number for that transaction which should be automatically increased and the seller should be able to see which memo is not going to be used so for this purpose I The Application Sale window has added a memo no field, which will show the memo number (final memo number + 1) database.

There is a problem here, let's say if 3 sales counter and the seller opens their respective sales windows for billing, they will see them all (Final Memo Number + 1) and if 3 of those bills happen together The same memo will be stored for 3 different transactions.

Let me tell you that for my sales there are 2 tables in Table 1 stores discount, Grand Total, Salesman ID and Memo no and table 2 store memo numbers, item Code, Quantity, Bill Date etc. Its its memo no / strong> two tables and if it gets tampered with, then you know what it can do in the monthly report.

This situation flowing from my mind came here to get the solution and solution. Any suggestions, links, codes that I can do to overcome this can be very useful.

You can consider modifying your design so that a memorandum is assigned to A customer starts a sale.

One way to implement this is to use another table to store the order of the memo numbers:

  Make Table Memo Sequence (MemoInt Int Identification (1, 1), Dataseted Debt Time)  

Each time the customer's sales window is open, the current date / time should be inserted in the memo suvens. The memoid value was returned to the client as a memo using the back (a OUTPUT section or SCOPE_IDENTITY () ).

Thus, the memo number assigned to each customer from the beginning of a unique transaction.

NB - This can not be a suitable solution if it is a necessity that there is no gap between the sequence of memo numbers.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -