.3 Phân tích thiết kế hệ thống ở mức vật lý

Một phần của tài liệu xây dựng chương trình mô phỏng quy trình quản lý công nợ (Trang 68)

III.3.1 Thành phần dữ liệu mức vật lý a) Mô tả các bảng Bảng III.1 : SoCongNo Bảng III.2 : BaoCaoDuKienPhaiThu Bảng III.3 : BaoCaoDuKienPhaiTra Bảng III.4 : BaoCaoPhaiThu

Bảng III.5 : BaoCaoPhaiTra

Bảng III.6 : BieuMau

Bảng III.7 : ChiTietBieuMau

Bảng III.9 : ChiTietDKThu

Bảng III.10 : ChiTietDKTra

Bảng III.12 : ChiTietPhaiTra

Bảng III.13 : ChucDanh

Bảng III.14 : DeBai

Bảng III.15 : DeBai_HopDong

Bảng III.17 : GiaoVien

Bảng III.18 : HopDong

Bảng III.19 : KhachHang

b) Mô tả các mối kết hợp

* Mối kết hợp có thuộc tính

- Kết hợp 2 thực thể BieuMau va DuLieu

-Kết hợp 2 thực thể DeBai va HopDong

* Mối kết hợp khơng có thuộc tính

- Kết hợp 2 thực thể BaoCaoDuKienPhaiThu và ChiTietDKThu

- Kết hợp 2 thực thể BaoCaoPhaiTra và ChiTietPhaiTra

- Kết hợp 2 thực thể BaoCaoPhaiThu và ChiTietPhaiThu

- Kết hợp 2 thực thể SoCongNo và ChiTietCongNo

- Kết hợp 2 thực thể DeBai và BaoCaoDuKienPhaiTra

- Kết hợp 2 thực thể DeBai và BaoCaoDuKienPhaiThu

- Kết hợp 2 thực thể DeBai và BaoCaoPhaiTra

- Kết hợp 2 thực thể DeBai và SoCongNo

- Kết hợp 2 thực thể BieuMau và ChucDanh

- Kết hợp 2 thực thể BieuMau và HopDong

- Kết hợp 2 thực thể HopDong và KhachHang

c) Mơ hình vật lý

III.3.2 Thành phần xử lý ở mức vật lý * Những đoạn code chính

Chúng tơi đã xây dựng 183 procedure để thực hiện các công việc giao tiếp với cơ sỏ dữ liệu. Dưới đây là một số procedure tiêu biểu :

- Procedure dùng để hiển thị chi tiết công nợ theo mã đề bài,mã khách hàng và loại khách hàng

Create proc [dbo].[sp_HienThiChiTietCongNo_MaDB_MaKH_Loai] @madb int,

@makh int, @loaikh int as

select c.* from socongno a,khachhang b,chitietcongno c where a.madb=@madb and a.makh=b.makh and b.makh=@makh and loaikh=@loaikh and

c.macn=a.macn

- Procedure dùng để hiển thị chứng từ theo mã đề bài và mã khách hàng Create proc [dbo].[sp_HienThiChungTuTheoMaDB_MaKH] @MaDB int,

@MaKH int as

Select * from bieumau a,khachhang b,debai_hopdong c,hopdong d where a.maloai not in (1,2)

And a.mahd=c.mahd and b.makh=d.makh and c.mahd=d.mahd And c.madb=@MaDB and b.makh=@MaKH

- Procedure hiển thị hóa đơn theo mã đề bài và mã khách hàng Create proc [dbo].[sp_HienThiHoaDonTheoMaDB_MaKH] @MaDB int,

@MaKH int as

Select * from bieumau a,khachhang b,debai_hopdong c,hopdong d where a.maloai in (1,2)

And a.mahd=c.mahd and b.makh=d.makh and c.mahd=d.mahd And c.madb=@MaDB and b.makh=@MaKH

- Procedure hiển thi hợp đồng theo tên khách hàng

Create proc [dbo].[sp_HienThiHopDong_TenKhachHang] @debai int, @htthamgia int, @tenkh nvarchar(100) as if @htthamgia=3 begin

select *from khachhang a,hopdong b,debai_hopdong c where a.tenkh=@tenkh and a.makh=b.makh

end else begin

select *from khachhang a,hopdong b,debai_hopdong c where a.tenkh=@tenkh and a.makh=b.makh

and b.htthamgia=@htthamgia and b.mahd=c.mahd and c.madb=@debai end

- Procedure hiển thị khách hàng theo loại khách hàng và mã đề bài Create proc [dbo].[sp_HienThiKHTheoLoaiVaMaDB] @LoaiKH int,

@MaDB int as

select distinct a.TenKH,a.MaKH from khachhang a,hopdong b,debai_hopdong c

where LoaiKH=@LoaiKH and MaDB=@MaDB and a.MaKH=b.makh and b.mahd=c.mahd

- Procedure hiển thị những khách hàng có sổ chi tiết cơng nợ Create proc [dbo].[sp_HTKhachHang_LamCTCN] @madb int

as

select distinct b.makh,b.tenkh from debai_hopdong a,khachhang b ,HopDong c where a.madb=@madb and a.mahd=c.mahd and b.makh=c.makh and b.makh <> 3

-Procedure dùng để lấy mã hợp đồng mới nhất Create proc [dbo].[sp_LayMaHopDongMoi] as

select * from HopDong where mahd =(select max(mahd) from HopDong)

* Phần code kiểm tra sinh viên cập nhật sổ chi tiết công nợ đúng hay sai

Private Sub btnLap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLap.Click Dim loi As Boolean = False

Dim i As Integer = 0 Dim j As Integer = 0

Dim grid As New DataTable grid = laygribCongNoCapNhat()

If DG_CN.RowCount - 1 = grid.Rows.Count Then For i = 0 To grid.Rows.Count - 1 For j = 0 To DG_CN.RowCount - 2 Try If CInt(Trim(DG_CN.Rows(j).Cells("So").Value)) = CInt(Trim(grid.Rows(i).Item("CTCN_ChungTuSo"))) Then Exit For End If

Catch ex As Exception loi = True End Try Next If j = DG_CN.RowCount - 1 Then loi = True Else Try If CLng(Trim(DG_CN.Rows(j).Cells("No").Value)) <> CLng(Trim(grid.Rows(i).Item("CTCN_No"))) Then loi = True Exit For End If If CLng(Trim(DG_CN.Rows(j).Cells("Co").Value)) <> CLng(Trim(grid.Rows(i).Item("CTCN_Co"))) Then loi = True Exit For End If Catch ex As Exception loi = True End Try End If Next Else loi = True End If

Dim loi_conlai As Boolean = False If loi = True Then

MsgBox("Xem lại các chứng từ liên quan đi.Chi tiết cơng nợ này có vấn đề rồi

đó ")

DuLieuChung.LoiPhatSinh = DuLieuChung.LoiPhatSinh + 1

DuLieuChung.listboxLoi.Items.Add("- Đã từng lập chi tiết công nợ sai") Else Dim gt1 As Long = 0 Dim gt2 As Long = 0 Dim gt3 As Long = 0 If txtNo.Text = "" Then gt1 = 0 Else gt1 = CLng(Trim(txtNo.Text)) End If If txtCo.Text = "" Then gt2 = 0 Else gt2 = CLng(Trim(txtCo.Text)) End If

If txtConLai.Text = "" Then gt3 = 0

Else

gt3 = CLng(Trim(txtConLai.Text)) End If

If tongno <> gt1 Or tongco <> gt2 Or tongconlai <> gt3 Then

MsgBox("Xem lại giá trị tổng nợ, có, cịn lại. Giá trị chưa chính xác") Else

Try

For p As Integer = 0 To DG_CN.RowCount - 2 Dim _No As Long = 0

Dim _Co As Long = 0 Dim _ConLai As Long = 0 Dim Prev_ConLai As Long = 0

If Trim(DG_CN.Rows(p).Cells("No").Value).ToString = "" Then _No = 0 Else _No = CLng(Trim(DG_CN.Rows(p).Cells("No").Value)) End If If Trim(DG_CN.Rows(p).Cells("Co").Value).ToString = "" Then _Co = 0 Else _Co = CLng(Trim(DG_CN.Rows(p).Cells("Co").Value)) End If If Trim(DG_CN.Rows(p).Cells("ConLai").Value).ToString = "" Then _ConLai = 0 Else _ConLai = CLng(Trim(DG_CN.Rows(p).Cells("ConLai").Value)) End If If loaikh = 1 Then If p = 0 Then

If _No - _Co <> _ConLai Then loi_conlai = True Exit For End If Else If Trim(DG_CN.Rows(p - 1).Cells("ConLai").Value).ToString = "" Then Prev_ConLai = 0 Else Prev_ConLai = CLng(Trim(DG_CN.Rows(p – 1).Cells("ConLai").Value)) End If

If Prev_ConLai + _No - _Co <> _ConLai Then loi_conlai = True

Exit For End If

End If Else

If p = 0 Then

If _Co - _No <> _ConLai Then loi_conlai = True Exit For End If Else If Trim(DG_CN.Rows(p - 1).Cells("ConLai").Value).ToString = "" Then Prev_ConLai = 0 Else Prev_ConLai = CLng(Trim(DG_CN.Rows(p – 1).Cells("ConLai").Value)) End If

If Prev_ConLai + _Co - _No <> _ConLai Then loi_conlai = True Exit For End If End If End If Next Catch ex As Exception loi_conlai = True End Try

If loi_conlai = True Then

MsgBox("Lỗi giá trị cột còn lại") Else

If txtBo.Text <> "" And txtDoiTuong.Text <> "" And txtDonVi.Text <> ""

Then

MsgBox("Đã cập nhật giảm trừ công nợ cho " + TenKhachHang) DuLieuChung.TuFormTroGiup = 0 DuLieuChung.DayLaFormCTCN_CN = 0 Me.PicNguoiLap.Visible = True Me.btnThoat.Enabled = True Me.btnLap.Enabled = False Else

MsgBox("Phải nhập đầy đủ dữ liệu ") End If

End If End If End If End Sub

* Phần code thuật toán kiểm tra việc lập sổ chi tiết công nợ của sinh viên

đúng hay sai

Dim loi As Boolean = False Dim i As Integer = 0 Dim j As Integer = 0

Dim grid As New DataTable

grid = LayDuLieuChiTietSoCongNo()

If DG_CN.RowCount - 1 = grid.Rows.Count Then For i = 0 To grid.Rows.Count - 1 For j = 0 To DG_CN.RowCount - 2 Try If CInt(Trim(DG_CN.Rows(j).Cells("So").Value)) = CInt(Trim(grid.Rows(i).Item("CTCN_ChungTuSo"))) Then Exit For End If Catch ex As Exception loi = True End Try Next If j = DG_CN.RowCount - 1 Then loi = True Else Try If CLng(Trim(DG_CN.Rows(j).Cells("No").Value)) <> CLng(Trim(grid.Rows(i).Item("CTCN_No"))) Then loi = True Exit For End If If CLng(Trim(DG_CN.Rows(j).Cells("Co").Value)) <> CLng(Trim(grid.Rows(i).Item("CTCN_Co"))) Then loi = True Exit For End If Catch ex As Exception loi = True End Try End If Next Else loi = True End If

Dim loi_conlai As Boolean = False If loi = True Then

MsgBox("Xem lại các chứng từ liên quan đi.Chi tiết công nợ này có vấn đề rồi

đó")

DuLieuChung.LoiPhatSinh = DuLieuChung.LoiPhatSinh + 1

DuLieuChung.listboxLoi.Items.Add("- Đã từng lập chi tiết công nợ sai") Else

Dim gt1 As Long = 0 Dim gt2 As Long = 0 Dim gt3 As Long = 0 If txtNo.Text = "" Then

gt1 = 0 Else gt1 = CLng(Trim(txtNo.Text)) End If If txtCo.Text = "" Then gt2 = 0 Else gt2 = CLng(Trim(txtCo.Text)) End If If txtConLai.Text = "" Then gt3 = 0 Else gt3 = CLng(Trim(txtConLai.Text)) End If

If tongno <> gt1 Or tongco <> gt2 Or tongconlai <> gt3 Then

MsgBox("Xem lại giá trị tổng nợ, có, cịn lại. Giá trị chưa chính xác") Else

Try

For p As Integer = 0 To DG_CN.RowCount - 2 Dim _No As Long = 0

Dim _Co As Long = 0 Dim _ConLai As Long = 0 Dim Prev_ConLai As Long = 0

If Trim(DG_CN.Rows(p).Cells("No").Value) = "" Then _No = 0 Else _No = CLng(Trim(DG_CN.Rows(p).Cells("No").Value)) End If If Trim(DG_CN.Rows(p).Cells("Co").Value) = "" Then _Co = 0 Else _Co = CLng(Trim(DG_CN.Rows(p).Cells("Co").Value)) End If If Trim(DG_CN.Rows(p).Cells("ConLai").Value) = "" Then _ConLai = 0 Else _ConLai = CLng(Trim(DG_CN.Rows(p).Cells("ConLai").Value)) End If If loaikh = 1 Then If p = 0 Then

If _No - _Co <> _ConLai Then loi_conlai = True

Exit For End If Else

If Trim(DG_CN.Rows(p - 1).Cells("ConLai").Value) = "" Then Prev_ConLai = 0

Else

Prev_ConLai = CLng(Trim(DG_CN.Rows(p –

1).Cells("ConLai").Value)) End If

If Prev_ConLai + _No - _Co <> _ConLai Then loi_conlai = True Exit For End If End If Else If p = 0 Then

If _Co - _No <> _ConLai Then loi_conlai = True

Exit For End If Else

If Trim(DG_CN.Rows(p - 1).Cells("ConLai").Value) = "" Then Prev_ConLai = 0

Else

Prev_ConLai = CLng(Trim(DG_CN.Rows(p –

1).Cells("ConLai").Value)) End If

If Prev_ConLai + _Co - _No <> _ConLai Then loi_conlai = True Exit For End If End If End If Next Catch ex As Exception loi_conlai = True End Try

If loi_conlai = True Then

MsgBox("Lỗi giá trị cột còn lại") Else

If txtBo.Text <> "" And txtDoiTuong.Text <> "" And txtDonVi.Text <> "" Then

MsgBox("Đã lập báo cáo chi tiết công nợ cho " + tenkhachhang) kiemtra = True

Me.PicNguoiLap.Visible = True Me.btnThoat.Enabled = True Me.btnLap.Enabled = False Else

MsgBox("Phải nhập đầy đủ dữ liệu ") End If

End If End If End If

*Phần code thuật toán kiểm tra việc lập báo cáo của sinh viên

Private Sub btSVLap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btSVLap.Click Dim loi As Boolean = False

Dim solan As Integer = 0 Dim i As Integer = 0 Dim j As Integer = 0 Dim giatri1 As Double Dim giatri2 As Double Dim grid As New DataTable

grid = layChiTietCongNoPhaiThu()

If DG_BaoCaoThu.RowCount - 1 = grid.Rows.Count Then For i = 0 To DG_BaoCaoThu.RowCount - 2 For j = 0 To grid.Rows.Count - 1 If DG_BaoCaoThu.Rows(j).Cells("TenKhachHang").Value = CStr(grid.Rows(i).Item("TenKhachHang")) Then If DG_BaoCaoThu.Rows(j).Cells("SoTienPhatSinh").Value = "" Then giatri1 = 0 Else giatri1 = CDbl(DG_BaoCaoThu.Rows(j).Cells("SoTienPhatSinh").Value) End If If grid.Rows(i).Item("SoTienPhatSinh").ToString = "" Then giatri2 = 0 Else giatri2 = CDbl(grid.Rows(i).Item("SoTienPhatSinh")) End If

If giatri1 <> giatri2 Then Continue For End If If DG_BaoCaoThu.Rows(j).Cells("SoLuong").Value = "" Then giatri1 = 0 Else giatri1 = 0 'CDbl(DG_BaoCaoThu.Rows(i).Cells("SoLuong").Value) End If If grid.Rows(i).Item("SoDuDauKy").ToString = "" Then giatri2 = 0 Else giatri2 = 0 'CDbl(grid.Rows(j).Item("SoDuDauKy")) End If

If giatri1 <> giatri2 Then Continue For End If If DG_BaoCaoThu.Rows(j).Cells("DaThu").Value = "" Then giatri1 = 0 Else giatri1 = CDbl(DG_BaoCaoThu.Rows(j).Cells("DaThu").Value) End If

If grid.Rows(i).Item("SoTienDaThu").ToString = "" Then giatri2 = 0

Else

giatri2 = CDbl(grid.Rows(i).Item("SoTienDaThu")) End If

If giatri1 <> giatri2 Then Continue For End If If DG_BaoCaoThu.Rows(j).Cells("ConLai").Value = "" Then giatri1 = 0 Else giatri1 = CDbl(DG_BaoCaoThu.Rows(j).Cells("ConLai").Value) End If If grid.Rows(i).Item("SoTienConPhaiThu").ToString = "" Then giatri2 = 0 Else giatri2 = CDbl(grid.Rows(i).Item("SoTienConPhaiThu")) End If

If giatri1 <> giatri2 Then Continue For End If solan = solan + 1 Exit For End If Next Try Catch ex As Exception loi = True End Try Next Else loi = True End If

If solan = grid.Rows.Count Then loi = False

Else

loi = True End If

If loi = True Then

MsgBox("Xem lại các chứng từ liên quan đi.Báo cáo cơng nợ phải thu này có vấn đề

rồi đó") DuLieuChung.LoiPhatSinh = DuLieuChung.LoiPhatSinh + 1

DuLieuChung.listboxLoi.Items.Add("- Đã từng lập công nợ phải thu sai") Me.Button1.Enabled = False

Else

MsgBox("Đã lập báo cáo công nợ phải thu của tháng này. Tiếp tục công việc nào.")

DuLieuChung.SV_KiemTraBuoc10 = 1 DuLieuChung.XemCoCK = 0

Dim a As New LapBaoCao a.Show()

Me.Close() End If

End Sub

(Ghi chú : Việc kiểm tra lập báo cáo phải trả tương tự như trên)

*Phần code thuật toán kiểm tra việc lập kế hoạch thu chi

Private Sub btnLap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

Handles btnLap.Click Dim loi As Boolean = False

Dim loint As Boolean = False Dim solanthay As Integer = 0 Dim i As Integer = 0

Dim j As Integer = 0

Dim grid As New DataTable grid = laygiatriGrid()

Try

If DG_DuKienThu.RowCount - 1 = grid.Rows.Count Then For i = 0 To DG_DuKienThu.RowCount - 2 For j = 0 To grid.Rows.Count - 1 If DG_DuKienThu.Rows(i).Cells("TenKhachHang").Value = CStr(grid.Rows(j).Item("TenNCC")) Then If CDbl(DG_DuKienThu.Rows(i).Cells("SoTien").Value) <> CDbl(grid.Rows(j).Item("SoTien")) Then Continue For End If If CStr(Trim(DG_DuKienThu.Rows(i).Cells("NgayGiaoHang").Value)) <> CStr(Trim(grid.Rows(j).Item("NgayGiaoHang"))) Then loint = True Continue For End If If CStr(Trim(DG_DuKienThu.Rows(i).Cells("NgayThu").Value)) <> CStr(Trim(grid.Rows(j).Item("NgayThuDuKien"))) Then loint = True Continue For End If solanthay = solanthay + 1 End If Next Next Else

loi = True End If

Catch ex As Exception loi = True

End Try

If solanthay = grid.Rows.Count Then loi = False

Else

loi = True End If

Label1.Text = CStr(solanthay) If loint = True Then

MsgBox("Nhập sai ngày tháng.(Theo định dạng : dd/mm/yyyy. Ví dụ : 03/09/2009")

Me.btnThoat.Enabled = False

DuLieuChung.LoiPhatSinh = DuLieuChung.LoiPhatSinh + 1

DuLieuChung.listboxLoi.Items.Add("- Đã từng lập kế hoạch chi sai") ElseIf loi = True Then

MsgBox("Xem lại đi. Lập kế hoạch thu sai rồi") Me.btnThoat.Enabled = False

DuLieuChung.LoiPhatSinh = DuLieuChung.LoiPhatSinh + 1

DuLieuChung.listboxLoi.Items.Add("- Đã từng lập kế hoạch thu sai") Else

Me.PicNguoiLap.Visible = True

MsgBox("Tốt lắm. Đã lập xong kế hoạch thu ") DuLieuChung.SV_KiemTraBuoc4 = 1

Me.btnThoat.Enabled = True Me.btnLap.Enabled = False End If

End Sub

(Ghi chú : Việc kiểm tra lập kế hoạch chi tương tự như trên).

*Phần code kiểm tra việc nhận biết chứng từ

Private Sub btn_KiemTraBM_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_KiemTraBM.Click loi = True

Dim ChungTuHD As New DataTable

ChungTuHD = load_ChungTu_TheoHopDong(list_HopDong.SelectedItem) Dim tmp As Integer = 0

If list_DSBMChon.Items.Count <> ChungTuHD.Rows.Count Then loi = True

Else

For i As Integer = 0 To list_DSBMChon.Items.Count - 1 For j As Integer = 0 To ChungTuHD.Rows.Count - 1

If list_DSBMChon.Items.Item(i) = ChungTuHD.Rows(j).Item("TenBM") Then

tmp = tmp + 1 End If

Next Next End If If tmp = ChungTuHD.Rows.Count Then loi = False End If

If loi = False Then

' If list_HopDong.Items.Count > 0 Then

MsgBox("Đã nhận biết đúng! Tiếp tục phân loại các chứng từ còn lại cho phù hợp với hợp đồng") list_HopDong.Items.RemoveAt(list_HopDong.SelectedIndex) list_DSBMChon.Items.Clear() If list_HopDong.Items.Count > 0 Then If list_HopDong.SelectedIndex = -1 Then list_HopDong.SelectedIndex = 0 End If Else GroupBox1.Enabled = False GroupBox2.Enabled = False GroupBox4.Enabled = False GroupBox7.Enabled = False GbCT_HD.Enabled = False

MsgBox("Chúng ta đã hồn thành cơng việc nhận biết chứng từ! ") End If

Else

MsgBox("Nhận biết chứng từ sai rồi")

DuLieuChung.LoiPhatSinh = DuLieuChung.LoiPhatSinh + 1 solanloi = solanloi + 1

End If End Sub

*Phần code kiểm tra việc nhận biết hợp đồng

Private Sub btnKiemTra_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKiemTra.Click loiban = True

Dim i, j As Integer Dim tmp As Integer = 0

Dim HDMua As New DataTable() HDMua = loadHopDongMua() Dim HDBan As New DataTable() HDBan = loadHopDongBan()

If list_HDBan.Items.Count <> HDBan.Rows.Count Then loiban = True

Else

For i = 0 To list_HDBan.Items.Count - 1 For j = 0 To HDBan.Rows.Count - 1

tmp = tmp + 1 'Exit For End If Next Next End If If tmp = HDBan.Rows.Count Then loiban = False End If tmp = 0

If list_HDMua.Items.Count <> HDMua.Rows.Count Then loimua = True

Else

For i = 0 To list_HDMua.Items.Count - 1 For j = 0 To HDMua.Rows.Count - 1

If list_HDMua.Items.Item(i) = HDMua.Rows(j).Item("TenHD") Then tmp = tmp + 1 End If Next Next End If If tmp = HDMua.Rows.Count Then loimua = False End If

If loimua = True Or loiban = True Then solanloi = solanloi + 1

MsgBox("Nhận biết hợp đồng sai rồi")

DuLieuChung.LoiPhatSinh = DuLieuChung.LoiPhatSinh + 1 Else

MsgBox("Nhận biết hợp đồng đúng rồi đó") btnHD_Ban.Visible = True btnHD_Mua.Visible = True DuLieuChung.SV_KiemTraBuoc1 = 1 Me.btnKiemTra.Enabled = False Me.btnMua.Enabled = False Me.btnMuaAll.Enabled = False Me.btnReMua.Enabled = False Me.btnReMuaAll.Enabled = False Me.btnReTra.Enabled = False Me.btnReTraAll.Enabled = False Me.btnTra.Enabled = False End If End Sub

*Phần code kiểm tra việc tìm hóa đơn theo đúng hợp đồng

Private Sub btnKiemTra_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKiemTra.Click loi1 = True

Dim HoaDon_HopDong As New DataTable HoaDon_HopDong =

load_hoadon_TheoHopDong(LayHopDongTheoMaHD().rows(0).item("tenhd")) Dim tmp As Integer = 0

If list_HoaDon_HopDong.Items.Count <> HoaDon_HopDong.Rows.Count Then loi1 = True

Else

For i As Integer = 0 To list_HoaDon_HopDong.Items.Count - 1 For j As Integer = 0 To HoaDon_HopDong.Rows.Count - 1 If list_HoaDon_HopDong.Items.Item(i) = HoaDon_HopDong.Rows(j).Item("TenBM") Then tmp = tmp + 1 End If Next Next End If If tmp = HoaDon_HopDong.Rows.Count Then loi1 = False End If

If loi1 = False Then

MsgBox("Nhận biết hóa đơn đúng rồi.") Me.Button1.Enabled = False

Me.Button2.Enabled = False Me.GroupBox2.Enabled = False Else

MsgBox("Nhận biết hóa đơn sai rồi")

DuLieuChung.LoiPhatSinh = DuLieuChung.LoiPhatSinh + 1 solanloi = solanloi + 1

End If End Sub

III.3.3 Thành phần giao diện ở mức vật lý

Hình III.2 : Giao diện màn hình chính

Hình III.4 : Màn hình mơ phỏng mơ hình cơng ty

Hình III.6 : Màn hình mơ phỏng phịng Kế tốn trưởng

Hình III.8 : Màn hình mơ phỏng bộ phận kế tốn thanh tốn

Hình III.10 : Màn hình trợ giúp lập biểu mẫu

Hình III.12 : Màn hình Lập sổ chi tiết cơng nợ

Hình III.14 : Màn hình lập báo cáo cơng nợ phải thu và báo cáo công nợ phải trả

Chương IV : Giới thiệu Sản phẩm

IV.1 Các chức năng quản lý tình huống của chương trình

Quản lý tình huống là một module quan trọng của chương trình. Gồm các chức năng thêm, sửa, xóa các nguồn dữ liệu dành cho người dùng thực hành. Chúng tôi đã cố gắng xây dựng module quản lý này làm sao cho một cách tối ưu nhất, tiết kiệm

được thời gian và công sức của người dùng trong việc quản lý các tình huống, nhất là

trong việc tạo ra các tình huống mới cho người dùng thực hành. Module này gồm những chức năng chính sau :

- Quản lý thông tin của các đối tượng khách hàng và nhà cung cấp. Đây là các thông tin dùng để điền vào các biểu mẫu, chứng từ xuất hiện trong chương trình. Chương trình sẽ tự lấy dữ liệu thơng tin này để tạo ra nội dung cho các biểu mẫu, chứng từ trong quá trình tạo tình huống mới. Người dùng sẽ không cần phải nhập các dữ liệu này lại, giúp tiết kiệm thời gian cho người dùng trong việc tạo tình huống.

Một phần của tài liệu xây dựng chương trình mô phỏng quy trình quản lý công nợ (Trang 68)

Tải bản đầy đủ (PDF)

(115 trang)