๐Ÿ“ฆ 0372hoanghoccode / ko-co

๐Ÿ“„ CHAMCONG.java ยท 139 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139package DTO;

public class CHAMCONG {

    private String maBangChamCong;
    private String maNhanVien;
    private int thangChamCong;
    private int namChamCong;
    private int soNgayLamViec;
    private int soNgayNghi;
    private int soNgayTre;
    private int soGioLamThem;
    private String chiTiet;
    
    public CHAMCONG() {
        this.maBangChamCong = null;
        this.maNhanVien = "";
        this.thangChamCong = 1;
        this.namChamCong = 2020;
        this.soNgayLamViec = 0;
        this.soNgayNghi = 0;
        this.soNgayTre = 0;
        this.soGioLamThem = 0;
        this.chiTiet=null;
    
    }

    public CHAMCONG(String maBangChamCong, String maNhanVien, int thangChamCong, int namChamCong, int soNgayLamViec, int soNgayNghi, int soNgayTre, int soGioLamThem, String chiTiet,String trangThai) {
        this.maBangChamCong = maBangChamCong;
        this.maNhanVien = maNhanVien;
        this.thangChamCong = thangChamCong;
        this.namChamCong = namChamCong;
        this.soNgayLamViec = soNgayLamViec;
        this.soNgayNghi = soNgayNghi;
        this.soNgayTre = soNgayTre;
        this.soGioLamThem = soGioLamThem;
        this.chiTiet=chiTiet;

    }
    
    public String getChiTiet() {
		return chiTiet;
	}

	public void setChiTiet(String chiTiet) {
		this.chiTiet = chiTiet;
	}

	public void setMaBangChamCong(String maBangChamCong) {
        this.maBangChamCong = maBangChamCong;
    }

    public void setMaNhanVien(String maNhanVien) {
        this.maNhanVien = maNhanVien;
    }

    public void setThangChamCong(int thangChamCong) {
        this.thangChamCong = thangChamCong;
    }

    public void setNamChamCong(int namChamCong) {
        this.namChamCong = namChamCong;
    }

    public void setSoNgayLamViec(int soNgayLamViec) {
        this.soNgayLamViec = soNgayLamViec;
    }

    public void setSoNgayNghi(int soNgayNghi) {
        this.soNgayNghi = soNgayNghi;
    }

    public void setSoNgayTre(int soNgayTre) {
        this.soNgayTre = soNgayTre;
    }

    public void setSoGioLamThem(int soGioLamThem) {
        this.soGioLamThem = soGioLamThem;
    }

    public String getMaBangChamCong() {
        return maBangChamCong;
    }

    public String getMaNhanVien() {
        return maNhanVien;
    }

    public int getThangChamCong() {
        return thangChamCong;
    }

    public int getNamChamCong() {
        return namChamCong;
    }

    public int getSoNgayLamViec() {
        return soNgayLamViec;
    }

    public int getSoNgayNghi() {
        return soNgayNghi;
    }

    public int getSoNgayTre() {
        return soNgayTre;
    }

    public int getSoGioLamThem() {
        return soGioLamThem;
    }

    public Object[][] getObjectToRender() {
        Object[][] data = new Object[][]{{
            this.getMaBangChamCong(),
            this.getMaNhanVien(),
            this.getThangChamCong() + "/" + this.getNamChamCong(),
            this.getSoNgayLamViec(),
            this.getSoNgayNghi(),
            this.getSoNgayTre(),
            this.getSoGioLamThem(),}
        };
        return data;
    }

    public String[] getDataToRenderEdit() {
        return new String[]{
            this.getMaBangChamCong(),
            this.getMaNhanVien(),
            this.getThangChamCong() + "",
            this.getNamChamCong() + "",
            this.getSoNgayLamViec() + "",
            this.getSoNgayNghi() + "",
            this.getSoNgayTre() + "",
            this.getSoGioLamThem() + ""
        };
    }
}