Creating the FormNewSalesOrder form

The FormNewSalesOrder form is used to enter a new sales order. This form makes use of the TabControl, where the first tab shows ComboBox controls for selecting the customer, the sales order date, and the sales order region. The second tab contains a DataGrid control that lists the line items of the sales order. There is also a MainMenu control that has MenuItem entries for adding, editing, and deleting line items, as well an entry for saving the sales order.

StepsCreating FormNewSalesOrder

  1. Add a new Form to the project and name the Form file FormNewSalesOrder.cs. The class contained in the file is automatically named FormNewSalesOrder.

  2. Set the FormNewSalesOrder MinimizeBox property to False.

  3. Add a using directive for both the Sybase.UnwiredAccelerator.Windows.Forms and the Sybase.UnwiredAccelerator.Data assemblies to the FormNewSalesOrder code.

  4. Place an Input Panel control on FormNewSalesOrder and name the object “sip.” Implement an empty handler function for the EnabledChanged event.

  5. Edit the FormNewSalesOrder form so it implements the Sybase.UnwiredAccelerator.Windows.Forms.IStackFormsManagerForm interface. See the sample implementation of this tutorial for the implementation of the IStackFormsManagerForm interface.

  6. Add a handler function for the FormNewSalesOrder Closing event as shown in the sample implementation of this tutorial.

  7. Now place a TabControl, DataGrid, several Label controls, and several ComboBoxes on the form and organize them as shown in the sample implementation of this tutorial.