Flow of Information in the PMS

Snoops

   

 
Migrating to .NET: A Pragmatic Path to Visual Basic .NET, Visual C++ .NET, and ASP.NET
By Dhananjay  Katre, Prashant  Halari, Narayana  Rao  Surapaneni, Manu  Gupta, Meghana  Deshpande

Table of Contents
Chapter 14.   Visual C++ .NET Migration Case Study


Let us start this section with the workflow of TraderWorkStation . The execution of the TraderWorkStation module results in the display of a screen with a dialog box: the Login dialog asking the user for a UserID and password to log into the system. See Figure 14-2. Only after the user enters the correct UserID and password is he or she logged into the system. Once the user logs into the system, the menu items and the toolbar become enabled allowing the user to perform further actions.

Figure 14-2. Login for Trader dialog.

graphics/14fig02.gif

The Login dialog also provides customers with an option to change their password. Whenever the customer clicks on the Change Password button, the Change Password dialog is displayed, which allows the customer to change the password. Alternatively, this can be accomplished by selecting Login from the menu and Change Password from the dropdown list. See Figure 14-3. This dialog can also be invoked from the toolbar by selecting the C option.

Figure 14-3. Change Password dialog.

graphics/14fig03.gif

To change the password the customer has to first enter the old password. Then the new password has to be entered. If, however, the old password entered is wrong, the customer will be prompted with an error message and will not be allowed to change the password.

After the user has successfully logged into the system, the Stock View appears. See Figure 14-4. This view contains the various stock IDs, current date and time, the current price of the stock, the low and high prices, the opening and closing prices of the stocks, and the last traded quantity. The current price of the stocks in this view is updated every 10 seconds. The change in the current price is reflected by the change in the color of the entire row for the stock. If the price of a stock has increased, the entire row of the stock will be in red. On the other hand if the stock price has fallen , the row will be green. If there is no change in the stock price, the row will be yellow. In short, this view the gives entire details of the stocks available.

Figure 14-4. Screen for Stock View.

graphics/14fig04.jpg

Customers who want to buy or sell a stock can do so by simply double-clicking on the appropriate stock in the Stock View. This will open the dialog box Stock Buy/Sell . See Figure 14-5. This dialog box has a combo box that contains all the stock IDs. The user has to select the appropriate stock ID. The current price of the stock will appear in the text box for that stock ID. The customer has to only enter the quantity of the transaction. The details of the customer such as the customer name , minimum amount, and margin amount are already populated by capturing that information at login. After the quantity is entered, the customer has to select Buy or Sell. If the customer selects Buy, the quantity specified is credited to the customer's account only after approval from the administrator. For a sell, the same quantity is debited from the customer's account.

Figure 14-5. Screen for Stock Buy/Sell.

graphics/14fig05.gif

Alternatively this dialog can also be invoked from the menu. Selecting Transaction from the menu and Buy/Sell from the dropdown list does this. The dialog can also be invoked from the toolbar by selecting the T option.

The Portfolio View shows details of a customer's stocks. See Figure 14-6. It shows the stock ID and name and the quantity of that stock ID. In short, it shows all the stocks possessed by the customer and the quantity of each stock. This view can be invoked either from the menu or from the toolbar. From the menu it is invoked by selecting View from the menu and View Portfolio from the dropdown list. From the toolbar it can be invoked by selecting the P option.

Figure 14-6. Screen for Portfolio View

graphics/14fig06.gif

The TraderWorkStation has another dialog called the Report View . See Figure 14-7. This view shows all the records of the customer whether approved, rejected, or pending and also Buy/Sell or All records. The customer can filter the report using the combo box and the radio buttons. From the combo box the customer can select the type of report wanted. This combo box has the following options: All, Approved, Declined, and Rejected. The radio buttons can be used to select the transaction type that the customer wants to see. The transaction-type options available to the customer are Buy, Sell, and All. Depending on the selection in the combo box and the radio button, the flexgrid will be populated. The total number of records retrieved is also shown. This dialog can be populated from both the toolbar and the menu. From the toolbar, selecting the R option will activate the dialog. From the menu, selecting View and View Report from the subsequent dropdown list can activate the dialog.

Figure 14-7. Screen for Report.

graphics/14fig07.jpg

Finally, the Logout option from either the menu or the toolbar will log the customer out of the system. After the customer has logged out, all the options in the menu and the toolbar except the Login option are disabled.

We have seen the workflow of the TraderWorkStation . Now let's move to the workflow of the AdminWorkStation . The AdminWorkStation is similar to the TraderWorkStation in many aspects. The login, change password, and the stock view are similar. For the administrator, however, the login is achieved by using admin as the UserID and password. Being the administrator, this user has special functions and can add a customer to the database, update the existing customer's information, and also approve all transactions of all the users. All this is achieved by the use of different dialog boxes. We will first have a look at the Add Customer function of the administrator. See Figure 14-8.

Figure 14-8. Screen for Add Customer.

graphics/14fig08.gif

When a new customer is to be added to the database, all the details such as customer ID, name, address, phone, password, email balance, and marginal amount has to be filled in by the administrator. On clicking on the Add button, the customer will be included in the database. However, if the information for the customer already exists in the database (i.e., if the customer ID is not unique), the system will prompt the administrator about it. The Clear button will clear all the fields in the dialog box. The Close button will close the dialog. The Add Customer dialog can be invoked from both the menu and the toolbar.

The Update Customer dialog box is similar to the Add Customer dialog box in terms of the fields it contains. See Figure 14-9. However, in this dialog box the Customer ID field, which was an edit box in the Add Customer dialog, has been replaced by a combo box. Because the administrator has to only update an existing customer's information, the combo box is populated to contain the IDs of all the customers in the database. Selection of a customer ID from the combo box will populate the rest of the information for the customer, filling up all the fields in the dialog box. Also in this dialog box the new password field is disabled initially. To change the password for a customer, the administrator has to first select the Change Password check box. Checking the check box will enable the Change Password edit box, and the administrator can now change the password for the customer. All the fields except the Customer ID in this dialog can be edited. After making the necessary changes, the administrator has to click on the Update button to save these changes. This dialog can be activated from both the toolbar by selecting U and from the menu by selecting Admin -> Update Customer .

Figure 14-9. Screen for Update Dialog.

graphics/14fig09.gif

As already mentioned, any transaction made by a customer is valid only after it is approved by the administrator. This is facilitated by the Order Approval Form dialog. See Figure 14-10. This dialog contains a combo box with a list of all the customers. The administrator has to select the customer ID for the transaction to be approved or rejected. The administrator can also filter the transactions of the customer. This is facilitated by a combo box that allows the administrator to view all the transactions of the customer or only the buy or the sell transactions. Depending on the selection in the Buy/Sell combo box, the flexgrid will be populated. To approve a particular transaction, the administrator has to select the transaction and click on the Approve button. This will result in approval of the order. If the Reject button is clicked, the transaction gets rejected. In either case the transaction is removed from the pending order list and added to the approval or rejection list. If the administrator selects the Close button after selecting a transaction, the dialog closes and the transaction is neither approved nor rejected (i.e., the transaction is considered to be still pending). This dialog can be invoked from the toolbar by the T option and from the menu by selecting Admin -> Approve Transactions .

Figure 14-10. Screen for Approve Transactions.

graphics/14fig10.gif


Snoops

   
Top


Migrating to. NET. A Pragmatic Path to Visual Basic. NET, Visual C++. NET, and ASP. NET
Migrating to. NET. A Pragmatic Path to Visual Basic. NET, Visual C++. NET, and ASP. NET
ISBN: 131009621
EAN: N/A
Year: 2001
Pages: 149

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net