User Data Processing is processing information related to User information such as username, secret word and access rights. This information processing client is the first part that discusses the frame design of information processing client.
Design User Data Processing Form
Previously open the Sales Application Project, Then Click the PROJET menu -> Add Windows Form. Then name it Form_User and click Add. Make a Form like the image below:
In the picture above I only use 3 buttons (Save, Cancel, Delete). Maybe somebody asks why there is no Update / Edit button and also Exit button? Here the Save button has two actions: Save and Update as well. The logic is if the information does not exist, then Save new information. If the information already exists, then refresh the existing information. As for the Exit button in the User Form itself there is already a Close button, so the addition of the exit button is not required.
Next set the Properties on some tool compartment in Form_Barang as follows:
The purpose of granting the Properties Name in the Toolbox is to prevent confusion using tool kits (especially TextBox) and also to make it easier to remember.
User Data Processing is a section that discusses the coding on User Form that has been made on User Data Processing. This section describes each sub and event coding associated with User data.
User Data Processing Coding
Here we will create some sub which will stay called in accordance with its function. At the top of the ODBC data import. Please press F7 on the keyboard to switch to the coding editor area.
Sub Clean
To cancel or clean part of Textbox
Sub Show_data
to display data from database to DataGridView
Sub Autocomplete
To make a suggestion on TextBox (TUsername)
Sub Call_All
To combine all Sub so that later call Sub enough Sub This is just the call
Event Form Load
Double click on the User Form section, then type the following coding
Event KeyDown on TUsername
Aim to fill in the existing data in the user table into another TextBox-TextBox after Tusername is filled then press Enter. This event was created in Tusername. Click on the (General) select Tuskin, then in the Declaration section select KeyDown. Type the following coding.
Search Facility
This search facility may be necessary, especially if the data reaches thousands. Very ineffective if looking for data one by one. This search is placed on the TUsername, if type Suplier ID then the data is directly sorted in the DataGridView section. The Evetn is TextChanged. Double click on the TUsername section and type the following coding.
DataGridView to TextBox
When data is clicked on the DataGridView, it will automatically appear on each TextBox. Event used is CellClick. In the (General) section select DGV (DataGridView), then in the (Declaration) section select CellClick. After that type the following coding
Save or Update Data
Double click the save button then type the following coding.
Delete data
Double click the delete button then type the following coding.
Cancellation (Cancel)
Double Click on the Cancel button then type the following coding.
Up here the discussion about User Data Processing. You do not have to be fixated on Coding above. You can add your own coding creations if the above coding is still lacking in your opinion.
UPVOTE & RESTEEM
FOLLOW ME @muchsin