Employee clocking System

Source: Internet
Author: User

Employee clocking System

language: C #

1. Analysis:

Figure 1 (Main page)

Available information according to Figure 1

1.Windows forms form, control DataGrid View (Display control), menu control, Label, Button,textbox.

2. To implement the menu control new, modify, delete and punch-in record; View features for Forms

Figure 2 (new, modify form)

(1) when new (2) is modified

According to Figure 2 (1) The information can be added when required to fill out according to Figure 2 (2) show that the original data changes and work number is not modified

Work number, age, name, gender selection.

Figure 3 (Punch card record form)

Fig. 3 is available

The number of records is displayed when the clock-out record is queried, and the employee clock-out record is displayed, such as the number of records is 0 display 0, if the data is not 0 (work number, name, check-in time, checkout time)

2. Building the structure

1. To display employee data

: Add Employee Class (employee)

: Declares an employee class as a list collection of types, initializes two records and binds to the DGV (Data Grid View shorthand)

Binding

To be added, modify and delete the data to be refreshed so create a refresh method

Example 1: Example 2:

Or

2. New

Open a new form in Figure 2 (1), in the new Form class, define the field to receive the data source "L" and decide to add or modify

is added when making various judgments:

1. Determine if the work bar is empty and the work number is duplicated

2. Determine if the Name column is empty

3. Determine whether the age bar is empty, whether the age is legal (such as greater than 18, and less than 65)

4. Select male and female and save (add to Data source "L")

5. Call Update

3. Modifications

Open a new form in Figure 2 (2), in the new Form class, define the field to receive the data source "L" and decide to add or modify

is to make various judgments when modifying:

2. Determine if the Name column is empty

3. Determine whether the age bar is empty, whether the age is legal (such as greater than 18, and less than 65)

4. Select male and female and save (add to Data source "L")

4. Delete

On the main page

1. Select a row of the DGV control (the row of the selected employee name (work number))

2. Confirm to the user whether to delete, such as confirm Delete, remove the object in the list collection

3. Call Refresh

5. View

On the main page

1. Check In/out number (fuzzy query, if not entered, show all)

6. Punch-in recording

To display the clock-out record: A new data source is required (dictionary is selected here)

Open the Punch record form

1. In the punch-Out record Form declaration field receive dictionary or main form

2. Display a total of several records, and detailed clock-out information

6. (2) (sign in, sign back)

Because there is a check-in record (Punch-in record), we add a shortcut menu control on the main form to bind on the DGV control and create a sign-in, checkout method to complete the punch-out

Operation. form the data to be added to the dictionary.

Employee clocking System

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.