Đề án Ứng dụng C# vào xây dựng chương trình quản lý công văn tại Bộ Tài Chính

1. Chức năng Nhận, gửi & phân loại công văn: Các văn thư của phòng tổng hợp văn phòng bộ sau khi nhận công văn từ bên ngoài gửi tới sẽ có nhiệm vụ phân loại các công văn này để xét xem công văn nào cần trình lên lãnh đạo bộ nào để lãnh đạo bộ xử lý. Ngoài ra, bộ phận này có có nhiệm vụ chuyển các công văn của bộ tới phòng hành chính để chuyển tới các đơn vị là địa chỉ đến của công văn. 2. Chức năng nhập ý kiến lãnh đạo Bộ: Sau khi công văn đến cùng phiếu trình bộ được chuyển tới cho lãnh đạo Bộ xử lý và cho ý kiến thì lãnh đạo bộ sẽ trả lại công văn đến đó cho phòng tổng hợp văn phòng bộ. Văn thư tại văn phòng bộ sẽ có nhiệm vụ nhập lại ý kiến xử lý của lãnh đạo bộ đối với công văn đó. 3. Chức năng theo dõi, tra cứu, xử lý công văn: Chức năng có nhiệm vụ là tra cứu, tìm kiếm, thống kê các thông tin của công văn để giúp cho văn thư có thể theo dõi và quản lý công văn: như có thể quản lý hồ sơ vụ việc theo các các tiến trình, thông báo công văn đến hạn trả lời,

doc107 trang | Chia sẻ: oanh_nt | Lượt xem: 1378 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Đề án Ứng dụng C# vào xây dựng chương trình quản lý công văn tại Bộ Tài Chính, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
ch lưu trữ, xử lý và tìm kiếm dữ liệu tối ưu nhất. Cơ sở dữ liệu gồm: Các dữ liệu về Công văn đến(công văn đến của Vụ, công văn trình Bộ): Số công văn, số hiệu, ký hiệu, ngày ký, ngày đến, mã đơn vị TBTC, mã đơn vị NBTC…. Các dữ liệu về Công văn đi(công văn đi của Bộ, công văn đi của Vụ): Số công văn, số hiệu, ký hiệu, ngày ký, ngày đi, mã đơn vị NBTC, mã đơn vị TBTC, mã người sử dụng, mã số công văn di,… Các dữ liệu về Sổ Công văn đến: Mã sổ công văn đến, mã đơn vị TBTC, tên sổ, tên đơn vị sử dụng, số công văn đã cấp, ghi chú. Các dữ liệu về Sổ Công văn đi: Mã sổ công văn đi, mã đơn vị TBTC, tên sổ, tên đơn vị sử dụng, số công văn đã cấp, ghi chú. Các dữ liệu về Phân loại Công văn: Mã loại công văn, tên loại công văn, ghi chú. Các dữ liệu về Đơn vị trong BTC: Mã đơn vị TBTC, tên đơn vị, ký hiệu đơn vị, ký hiệu công văn. Các dữ liệu về Phòng ban: Mã phòng, mã đơn vị trong BTC, tên phòng ban, ký hiệu, đơn vị. Các dữ liệu về Đơn vị ngoài BTC: Mã đơn vị ngoài BTC, tên đơn vị, ký hiệu công văn, địac chỉ, Email. Các dữ liệu về Người Sử Dụng(các cá nhân soạn thảo công văn, tham gia ý kiến, ký duyệt công văn): Mã người sử dụng, đơn vị, tên đăng kí, tên thường gọi, chức vụ, phòng ban, mã phòng, mã đơn vị trong Bộ Tài Chính, Mật khẩu. I. Sơ đồ liên kết thực thể E – R. Dựa trên các dữ liệu cần quản lý em đã xây dựng cơ sở dữ liệu gồm các bảng sau đây: SoCV SoHieu KyHieu NgayKy NgayDi MaDonVi_NBTC MaDonVi_TBTC Ma_NSD MaSoCVDi MaPhong DoKhan DoMat NoiGui PhongBan NoiNhan NguoiKy NguoiSoan GhiChu CapLuu CV đến SoCV SoHieu KyHieu NgayKy NgayDen MaDonVi_NBTC MaDonVi_TBTC MaPhong MaLoaiCV DoKhan NoiXuLy PhoiHop HanTraLoi TrichYeu ToanVan GhiChu CapLuu TuLuu PhapLy DiaDanh MaSoCVden NoiGui DoMat HanXuLy CVGuiTheoDuong CV đi MaLoaiCV HanTraLoi TrichYeu ToanVan DiaDanh TuLuu Sổ CV đến MaSoCVden MaDonVi_TBTC TenSo TenDVSuDung SoCVdacap GhiChu Sổ CV đi MaSoCVdi MaDonVi_TBTC TenSo TenDVSuDung SoCVDaCap GhiChu Phân loại CV MaLoaiCV TenLoaiCV GhiChu Đơn vị trong BTC MaDonVi_TBTC TenDonVi KyHieuDonVi KyHieuCV MaPhong Phòng ban MaDonVi_TBTC MaPhong TenPhongBan KyHieu DonVi Đơn vị ngoài BTC MaDonVi_NBTC TenDonVi KyHieuCV DiaChi Email Người sử dụng Ma_NSD DonVi TenDangKi TenThuongGoi ChucVu PhongBan MaPhong MaDonVi_TBTC MatKhau CVGuiTheoDuon 1. Bảng Công văn đến STT Tên trường Kiểu Độ rộng Mô tả 1 SoCV Text 15 Số công văn(Khoá chính) 2 SoHieu Text 15 Số hiệu 3 KyHieu Text 12 Ký hiệu 4 NgayKy Date/Time Ngày ký 5 NgayDen Date/Time Ngày đến 6 MaDonVi_NBTC Number Long Integer Mã đơn vị NBTC(Khoá ngoại lai) 7 MaDonVi_TBTC Number Long Integer Mã đơn vị T BTC(Khoá ngoại lai) 8 MaPhong Number Single Mã phòng(Khoá ngoại lai) 9 MaSoCVden Text 15 Mã sổ công văn đến(Khoá ngoại lai) 10 MaLoaiCV Number Long Integer Mã loại công văn(Khoá ngoại lai) 11 DoKhan Text 50 Độ khẩn 12 DoMat Text 50 Độ mật 13 NoiGui Text 250 Nơi gửi 14 NoiXuLy Text 250 Nơi xử lý 15 PhoiHop Text 250 Phối hợp 16 HanTraLoi Date/Time Hạn trả lời 17 HanXuLy Date/Time Hạn xử lý 18 TrichYeu Text 250 Trích yếu 19 ToanVan Text 250 Toàn văn 20 GhiChu Memo Ghi chú 21 CVGuiTheoDuong Text 245 Công văn gửi theo đường 22 DiaDanh Text 250 Địa danh 23 CapLuu Text 120 Cặp lưu 24 TuLuu Text 120 Tủ lưu 25 PhapLy Text 200 Pháp lý 2. Bảng công văn đi STT Tên trường Kiểu Độ rộng Mô tả 1 SoCV Text 15 Số công văn(Khoá chính) 2 SoHieu Text 15 Số hiệu 3 KyHieu Text 12 Ký hiệu 4 NgayKy Date/Time Ngày ký 5 NgayDi Date/Time Ngày đi 6 MaDonVi_NBTC Number Long Integer Mã đơn vị NBTC(Khoá ngoại lai) 7 MaDonVi_TBTC Number Long Integer Mã đơn vị TBTC(Khoá ngoại lai) 8 Ma_NSD Number Long Integer Mã NSD(Khoá ngoại lai) 9 MaSoCVDi Text 15 Mã số công văn đi(Khoá ngoại lai) 10 MaLoaiCV Number Long Integer Mã loại công văn(Khoá ngoại lai) 11 MaPhong Number Single Mã phòng(Khoá ngoại lai) 12 DoKhan Text 50 Độ khẩn 13 DoMat Text 50 Độ mật 14 NoiGui Text 250 Nơi gửi 15 PhongBan Text 250 Phòng ban 16 NoiNhan Text 250 Nơi nhận 17 NguoiKy Text 250 Người ký 18 NguoiSoan Text 235 Người soạn 19 HanTraLoi Date/Time Hạn trả lời 20 TrichYeu Text 250 Trích yếu 21 GhiChu Memo Ghi chú 22 ToanVan Text 250 Toàn văn 23 CVGuiTheoDuong Text 245 CV gửi theo đường 24 ĐiaDanh Text 250 Địa danh 25 CapLuu Text 120 Cặp lưu 26 TuLuu Text 120 Tủ lưu 3. Bảng Sổ công văn đi STT Tên trường Kiểu Độ rộng Mô tả 1 MaSoCVden Text 15 Mã sổ công văn đến(Khoá chính) 2 MaDonVi_TBTC Number LongInteger Mã đơn vị TBTC(Khoá ngoại lai) 3 TenSo Text 150 Tên sổ 4 TenĐVsuDung Text 250 Tên đơn vị sử dụng 5 SoCVdacap Number Long Integer Số công văn đã cấp 6 GhiChu Memo Ghi chú 4. Bảng Sổ công văn đi STT Tên trường Kiểu Độ rộng Mô tả 1 MaSoCVdi Text 15 Mã sổ công văn đi(Khoá chính) 2 MaDonVi_TBTC Number Long Integer Mã đơn vị TBTC(Khoá ngoại lai) 3 TenSo Text 150 Tên sổ 4 TenDVSuDung Text 250 Tên đơn vị sử dụng 5 SoCVDaCap Number Long Integer Số công văn đã cấp 6 GhiChu Memo Ghi chú 5. Bảng Phân loại công văn STT Tên trường Kiểu Độ rộng Mô tả 1 MaLoaiCV Number Long Integer Mã loại công văn(Khoá chính) 2 TenLoaiCV Text 40 Tên loại công văn 3 GhiChu Memo Ghi chú 6. Bảng Đơn vị trong Bộ Tài Chính STT Tên trường Kiểu Độ rộng Mô tả 1 MaDonVi_TBTC Number Long Integer Mã đơn vị trong BTC(Khoá chính) 2 TenDonVi Text 250 Tên đơn vị 3 KyHieuDonVi Text 10 Ký hiệu đơn vị 4 KýHieuCV Text 12 Ký hiệu công văn 7. Bảng Phòng ban STT Tên trường Kiểu Độ rộng Mô tả 1 MaPhong Number Single Mã phòng(Khoá chính) 2 MaDonVi_TBTC Number Long Integer Mã đơn vị trong BTC(Khoá ngoại lai) 3 TenPhongBan Text 50 Tên phòng ban 4 KyHieu Text 10 Ký hiệu 5 DonVi Text 250 Đơn vị 8. Bảng Đơn vị Ngoài Bộ Tài Chính STT Tên trường Kiểu Độ rộng Mô tả 1 MaDonVi_NBTC Number Long Integer Mã đơn vị ngoài BTC(Khoá chính) 2 TenDonVi Text 250 Tên đơn vị 3 KyHieuCV Text 12 Ký hiệu công văn 4 DiaChi Text 250 Địa chỉ 5 Email Text 25 Email 9. Bảng Người Sử Dụng STT Tên trường Kiểu Độ rộng Mô tả 1 Ma_NSD Number Long Integer Mã NSD(Khoá chính) 2 DonVi Text 250 Đơn vị 3 TenDangKi Text 250 Tên đăng kí 4 TenThuongGoi Text 250 Tên thường gọi 5 ChucVu Text 250 Chức vụ 6 PhongBan Text 250 Phòng ban 7 MaPhong Number Single Mã phòng(Khoá ngoại lai) 8 MaDon Vi_TBTC Number Long Integer Mã đơn vị trong BTC(Khoá ngoại lai) 9 MatKhau Text 25 Mật khẩu * Một số bảng cơ sở dữ liệu tạo trong Access D. Một số giải thuật chính của chương trình I- Thuật toán nhập dữ liệu Bắt đầu Sai Thiết lập môi trường tạo biến Nhập bản ghi trắng Nhập dữ liệu Kiểm tra dữ liệu? Đúng Có Bắt đầu Lưu dữ liệu Không Kết thúc Tiếp tục ? Mở bảng II – Thuật toán tìm kiếm Không Hiện kết quả tìm kiếm Bắt đầu Hiện giao diện tìm kiếm Nhập các thông tin cần tìm kiếm Tìm kiếm Thông báo Tiếp tục? Kết thúc Không tìm thấy Tìm thấy Có Bắt đầu Hiện giao diện thêm Công văn Nhập Số Công văn Kiểm tra Số Công văn đã có Số công văn chưa có Hiện giao diện thêm Công văn Lưu Công văn vào sổ Công văn Tiếp tục ? Có Không Kết thúc Thông báo III. Thuật toán thêm công văn E. Các chức năng & các giao diện chính của chương trình I – Các chức năng Hướng dẫn sử dụng Giới thiệu chương trình Báo cáo CV đi Báo cáo CV đến Xem, In sổ giao CV đi Xem, In sổ giao CV đến Xem, In CV đến Xem, In CV đi Báo cáo Trợ giúp Đơn vị ngoài BTC / CV đến Phòng ban / CV đi Phòng ban / CV đến Đơn vị TBTC / CV đến Sổ CV đi / CV đi Sổ CV đến / CV đến Tìm trên ổ đĩa và sao chép Tìm kiếm nhanh CV đến Tìm kiếm nhanh CV đi Đăng kí người dùng Sổ giao CV đến Nhập CV đến Cập nhật CV đến Cập nhật CV đi Sổ giao CV đi Nhập CV đi Thoát Danh sách người sử dụng Danh sách Phòng ban Danh sách đơn vị NBTC Danh sách đơn vị TBTC Save Open Thống kê dữ liệu Tìm kiếm Cập nhật Hệ thống Quản lý công văn Để chương trình quản lý công văn tại Bộ tài chính có thể thực hiện nhanh, kịp thời và hiệu quả sau quá trình phân tích, thiết kế hệ thống em đã tiến hành xây dựng chương trình gồm một số chức năng chính sau đây: II. Thiết kế màn hình giao diện của chương trình Trước khi sử dụng các chức năng của chương trình, người sử dụng phải đăng nhập vào hệ thống, bằng cách cung cấp Tên người dùng và Mật khẩu. Sau khi người sử dụng đăng nhập thành công thì họ sẽ có thể sử dụng chương trình này. Gồm các Menu chính sau đây: * Hệ thống: * Cập nhật: Màn hình cập nhật danh sách các đơn vị ngoài Bộ Tài Chính Màn hình này giúp cho người sử dụng nắm được các đơn vị ngoài Bộ Tài Chính qua các thông tin về Mã số, ký hiệu đơn vị, tên đơn vị và có quyền chuyển đổi Công văn khi gửi hay không? Cập nhật danh sách các Phòng ban trong Bộ Tài Chính Màn hình này cung cấp các thông tin về các phòng ban trong Bộ như: Mã phòng, tên phòng ban, ký hiệu… Cập nhật danh sách Người sử dụng hệ thống Với màn hình này sẽ giúp cho người quản lý hệ thống biết được lượng người sử dụng thông qua các thuộc tính : Mã người sử dụng, tên đăng kí, tên thường gọi, chức vụ thuộc phòng ban nào ? từ đó cập nhật thêm những người muốn đăng nhập vào hệ thống. Đăng kí người dùng Màn hình này dùng để đăng kí thêm người sử dụng nhằm quản lý những người có quyền quản trị hệ thống. Màn hình nhập công văn đi Màn hình này là mẫu để nhập các Công văn đi, người sử dụng có thể xem các Công văn trước đó bằng cách bấm vào nút > và bạn có thể nhập thêm Công văn mới. Cập nhật danh sách các Sổ Công văn đi Báo cáo về tình hình các công văn đến Với màn hình báo cáo này giúp người dùng cập nhật được toàn bộ các công văn đến để báo cáo cuối mỗi tuần. Báo cáo về loại sổ Công văn đến Báo cáo về tình hình các công văn đi Với màn hình này người sử dụng có thể nhận biết được tình hình công văn đến của Bộ Tài Chính thông qua đồ thị hoặc các thông tin chi tiết (Đồ thị này chỉ tổng số các Công văn đến theo tiêu thức Nơi gửi). Màn hình thống kê các loại Công văn đến theo phòng ban Màn hình này liệt kê danh sách các Phòng ban. Để xem thông tin chi tiết về các loại Công văn đến theo phòng ban thì ta có thể chọn dấu + bên trái ứng với mã phòng như hình trên. Trên đây là một số giao diện chính phục vụ cho việc nhập số liệu, cập nhật các danh mục, báo cáo về các loại sổ Công văn, tình hình Công văn. Ngoài ra, còn nhiều giao diện khác giúp cho người sử dụng hiểu sâu hơn về các nghiệp vụ, chức năng của chương trình nhưng không tiện nêu ra hết được. Kết luận Công văn từ xưa đến nay vẫn luôn là phương tiện giao tiếp hữu hiệu nhất của các cơ quan nhà nước. Nó có nhiệm vụ quan trọng trong việc quản lý, điều chỉnh các hành vi xã hội. Trong nền kinh tế thị trường của nước ta hiện nay, số lượng các công văn đến, đi ngày càng nhiều nên việc áp dụng các thành tựu khoa học kĩ thuật vào việc xây dựng chương trình này là cần thiết, giúp cho những người có trách nhiệm quản lý công văn thực hiện dễ dàng, nhanh & đạt kết quả cao phù hợp với sự phát triển của thời đại công nghiệp hoá, hiện đại hoá đất nước. Như vậy, nhiệm vụ của các nhà quản lý phát triển phần mềm không chỉ có vốn kiến thức tin học vững vàng mà cần nắm bất các thông tin biến đổi một cách nhanh nhất. Một lần nữa em xin bày tỏ lòng biết ơn chân thành tới các thầy cô giáo trong khoa tin học kinh tế trường Đại học kinh tế quốc dân đặc biệt là thầy giáo TS. Lê Văn Năm người đã trực tiếp hướng dẫn em hoàn thành chuyên đề thực tập này. Em xin chân thành cảm ơn các anh trong Ban quản lý ứng dụng tin học Bộ tài chính. Xin cám ơn tất cả các bạn đã giúp đỡ tôi hoàn thành đề tài này. Do khuôn khổ luận văn và khả năng có hạn nên chương trình không thể tránh khỏi những sai lầm & thiếu sót. Em rất mong nhận được những ý kiến đóng góp, nhận xét của các thầy cô, bạn bè để em có thể hoàn thiện hơn chương trình này. Tài liệu tham khảo 1 - PGS. Hàn Viết Thuận Giáo trình cấu trúc dữ liệu và giải thuật, NXB Thống kê, Hà Nội, 1999. 2 - TS.Trương Văn Tú – TS.Trần Thị Song Minh Giáo trình Hệ thống thông tin quản lý, Hà Nội, 2000. 3 - Thạc sỹ Đinh Thế Hiển Phân tích thiết kế hệ thống thông tin quản lý, NXB Thống kê, TPHCM, 2002. 4 - Trần Công Uẳn Giáo trình cơ sở dữ liệu SQL, ACCESS, NXB Thống kê, Hà Nội, 2000. 5 - Phạm Hữu Khang Kỹ thuật lập trình ứng dụng C#.net toàn tập, NXB Lao động – Xã hội, Hà Nội, 2002. 6 - TS.Lê Minh Trung – Quốc Bình C# cho người mới học, NXB Thống kê, Hà nội, 2002. 7 - Nguyễn Tiến – Nguyễn Phúc – Phạm Kỳ - Đặng Xuân Hương Lập trình C#, NXB Thống kê, Hà Nội, 2002. 8 - Programing Csh Oreilly 9 - Các bài luận văn khoá trước. 10 - Các tài liệu khác. Phụ lục chương trình Form chính của chương trình using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace Tina { /// /// Summary description for Form1. /// public class frmChinh : System.Windows.Forms.Form { private System.Windows.Forms.MainMenu mainMenu1; private System.Windows.Forms.MenuItem menuItem11; private System.Windows.Forms.MenuItem mnHethong; private System.Windows.Forms.MenuItem mndonviTBTC; private System.Windows.Forms.MenuItem mnPhongban; private System.Windows.Forms.MenuItem mnNSD; private System.Windows.Forms.MenuItem mnSolieu; private System.Windows.Forms.MenuItem mnCongvandi; private System.Windows.Forms.MenuItem mnSocongvandi; private System.Windows.Forms.MenuItem mnGioithieu; private System.Windows.Forms.MenuItem Thoat; private System.Windows.Forms.MenuItem mndonviNBTC; private System.Windows.Forms.MainMenu mainMenu2; private System.Windows.Forms.MenuItem mncnCVden; private System.Windows.Forms.MenuItem mnNhapCongVanDen; private System.Windows.Forms.MenuItem mncnCVdi; private System.Windows.Forms.MenuItem mnsoCVden; private System.Windows.Forms.MenuItem mnXemCVdi; private System.Windows.Forms.MenuItem mnXemCVden; private System.Windows.Forms.MenuItem mnXemsoCVden; private System.Windows.Forms.MenuItem mnXemsoCVdi; private System.Windows.Forms.MenuItem mnGioithieu1; private System.Windows.Forms.MenuItem mnhuongdan; private System.Windows.Forms.OpenFileDialog openFileDialog1; private System.Windows.Forms.SaveFileDialog saveFileDialog1; private System.Windows.Forms.MenuItem miOpen; private System.Windows.Forms.MenuItem miSave; private System.Windows.Forms.MenuItem menuItem1; private System.Windows.Forms.MenuItem mnSocv1; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.MenuItem menuItem2; private System.Windows.Forms.MenuItem mnTimkiemCVdi; private System.Windows.Forms.MenuItem mntimkiemCVden; private System.Windows.Forms.MenuItem mntimtrendia; private System.Windows.Forms.MenuItem mnSocv2; private System.Windows.Forms.MenuItem mndonvitbtcCVden; private System.Windows.Forms.MenuItem mnphongban1; private System.Windows.Forms.MenuItem mnphongban2; private System.Windows.Forms.MenuItem mndonviNBTC1; private System.Windows.Forms.MenuItem mnDangki; private System.Windows.Forms.MenuItem mnbaocaoCVden; private System.Windows.Forms.MenuItem mnbaocaoCVdi; /// /// Required designer variable. /// private System.ComponentModel.Container components = null; public frmChinh() { // // Required for Windows Form Designer support // InitializeComponent(); Tina.frmDangnhap Dangnhap = new Tina.frmDangnhap(this); Dangnhap.Show(); // // TODO: Add any constructor code after InitializeComponent call // } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmChinh)); this.mainMenu1 = new System.Windows.Forms.MainMenu(); this.mnHethong = new System.Windows.Forms.MenuItem(); this.miOpen = new System.Windows.Forms.MenuItem(); this.miSave = new System.Windows.Forms.MenuItem(); this.mndonviTBTC = new System.Windows.Forms.MenuItem(); this.mndonviNBTC = new System.Windows.Forms.MenuItem(); this.mnPhongban = new System.Windows.Forms.MenuItem(); this.mnNSD = new System.Windows.Forms.MenuItem(); this.Thoat = new System.Windows.Forms.MenuItem(); this.mnSolieu = new System.Windows.Forms.MenuItem(); this.mnCongvandi = new System.Windows.Forms.MenuItem(); this.mnSocongvandi = new System.Windows.Forms.MenuItem(); this.mncnCVdi = new System.Windows.Forms.MenuItem(); this.mncnCVden = new System.Windows.Forms.MenuItem(); this.mnNhapCongVanDen = new System.Windows.Forms.MenuItem(); this.mnsoCVden = new System.Windows.Forms.MenuItem(); this.mnDangki = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.mnTimkiemCVdi = new System.Windows.Forms.MenuItem(); this.mntimkiemCVden = new System.Windows.Forms.MenuItem(); this.mntimtrendia = new System.Windows.Forms.MenuItem(); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.mnSocv1 = new System.Windows.Forms.MenuItem(); this.mnSocv2 = new System.Windows.Forms.MenuItem(); this.mndonvitbtcCVden = new System.Windows.Forms.MenuItem(); this.mnphongban1 = new System.Windows.Forms.MenuItem(); this.mnphongban2 = new System.Windows.Forms.MenuItem(); this.mndonviNBTC1 = new System.Windows.Forms.MenuItem(); this.menuItem11 = new System.Windows.Forms.MenuItem(); this.mnXemCVdi = new System.Windows.Forms.MenuItem(); this.mnXemCVden = new System.Windows.Forms.MenuItem(); this.mnXemsoCVden = new System.Windows.Forms.MenuItem(); this.mnXemsoCVdi = new System.Windows.Forms.MenuItem(); this.mnbaocaoCVden = new System.Windows.Forms.MenuItem(); this.mnbaocaoCVdi = new System.Windows.Forms.MenuItem(); this.mnGioithieu = new System.Windows.Forms.MenuItem(); this.mnGioithieu1 = new System.Windows.Forms.MenuItem(); this.mnhuongdan = new System.Windows.Forms.MenuItem(); this.mainMenu2 = new System.Windows.Forms.MainMenu(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.SuspendLayout(); // // mainMenu1 // this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnHethong, this.mnSolieu, this.menuItem2, this.menuItem1, this.menuItem11, this.mnGioithieu}); // // mnHethong // this.mnHethong.Index = 0; this.mnHethong.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.miOpen, this.miSave, this.mndonviTBTC, this.mndonviNBTC, this.mnPhongban, this.mnNSD, this.Thoat}); this.mnHethong.Text = "&Hệ thống"; this.mnHethong.Click += new System.EventHandler(this.mnHethong_Click); // // miOpen // this.miOpen.Index = 0; this.miOpen.Text = "1. &Open"; this.miOpen.Click += new System.EventHandler(this.miOpen_Click); // // miSave // this.miSave.Index = 1; this.miSave.Text = "2. &Save"; this.miSave.Click += new System.EventHandler(this.miSave_Click); // // mndonviTBTC // this.mndonviTBTC.Index = 2; this.mndonviTBTC.MdiList = true; this.mndonviTBTC.Text = "3. &Danh sách đơn vị TBTC"; this.mndonviTBTC.Click += new System.EventHandler(this.mndonviTBTC_Click); // // mndonviNBTC // this.mndonviNBTC.Index = 3; this.mndonviNBTC.MdiList = true; this.mndonviNBTC.Text = "4. &Danh sách đơn vị NBTC"; this.mndonviNBTC.Click += new System.EventHandler(this.mndonviNBTC_Click); // // mnPhongban // this.mnPhongban.Index = 4; this.mnPhongban.MdiList = true; this.mnPhongban.Text = "5. &Danh sách Phòng ban"; this.mnPhongban.Click += new System.EventHandler(this.mnPhongban_Click); // // mnNSD // this.mnNSD.Index = 5; this.mnNSD.MdiList = true; this.mnNSD.Text = "6. &Danh sách Người Sử Dụng"; this.mnNSD.Click += new System.EventHandler(this.mnNSD_Click); // // Thoat // this.Thoat.Index = 6; this.Thoat.Text = "7. &Thoát"; this.Thoat.Click += new System.EventHandler(this.Thoat_Click); // // mnSolieu // this.mnSolieu.Index = 1; this.mnSolieu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnCongvandi, this.mnSocongvandi, this.mncnCVdi, this.mncnCVden, this.mnNhapCongVanDen, this.mnsoCVden, this.mnDangki}); this.mnSolieu.Text = "&Cập nhật"; // // mnCongvandi // this.mnCongvandi.Index = 0; this.mnCongvandi.MdiList = true; this.mnCongvandi.Text = "1. &Nhập Công văn đi"; this.mnCongvandi.Click += new System.EventHandler(this.mnCongvandi_Click); // // mnSocongvandi // this.mnSocongvandi.Index = 1; this.mnSocongvandi.MdiList = true; this.mnSocongvandi.Text = "2. &Sổ giao Công văn đi"; this.mnSocongvandi.Click += new System.EventHandler(this.mnSocongvandi_Click); // // mncnCVdi // this.mncnCVdi.Index = 2; this.mncnCVdi.Text = "3. &Cập nhật Công văn đi"; this.mncnCVdi.Click += new System.EventHandler(this.mncnCVdi_Click); // // mncnCVden // this.mncnCVden.Index = 3; this.mncnCVden.MdiList = true; this.mncnCVden.Text = "4. &Cập nhật Công văn đến"; this.mncnCVden.Click += new System.EventHandler(this.mncnCVden_Click); // // mnNhapCongVanDen // this.mnNhapCongVanDen.Index = 4; this.mnNhapCongVanDen.Text = "5. &Nhập Công văn đến"; this.mnNhapCongVanDen.Click += new System.EventHandler(this.mnNhapCongVanDen_Click); // // mnsoCVden // this.mnsoCVden.Index = 5; this.mnsoCVden.Text = "6. &Sổ giao Công văn đến"; this.mnsoCVden.Click += new System.EventHandler(this.mnsoCVden_Click); // // mnDangki // this.mnDangki.Index = 6; this.mnDangki.Text = "7. &Đăng kí người dùng"; this.mnDangki.Click += new System.EventHandler(this.mnDangki_Click); // // menuItem2 // this.menuItem2.Index = 2; this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnTimkiemCVdi, this.mntimkiemCVden, this.mntimtrendia}); this.menuItem2.Text = "&Tìm kiếm "; // // mnTimkiemCVdi // this.mnTimkiemCVdi.Index = 0; this.mnTimkiemCVdi.Text = "1. &Tim kiếm nhanh Công văn đi "; this.mnTimkiemCVdi.Click += new System.EventHandler(this.mnTimkiemCVdi_Click); // // mntimkiemCVden // this.mntimkiemCVden.Index = 1; this.mntimkiemCVden.Text = "2. &Tìm kiếm nhanh Công văn đến "; this.mntimkiemCVden.Click += new System.EventHandler(this.mntimkiemCVden_Click); // // mntimtrendia // this.mntimtrendia.Index = 2; this.mntimtrendia.Text = "3. &Tìm trên ổ đĩa và sao chép"; this.mntimtrendia.Click += new System.EventHandler(this.mntimtrendia_Click); // // menuItem1 // this.menuItem1.Index = 3; this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnSocv1, this.mnSocv2, this.mndonvitbtcCVden, this.mnphongban1, this.mnphongban2, this.mndonviNBTC1}); this.menuItem1.Text = "&Thống kê dữ liệu"; // // mnSocv1 // this.mnSocv1.Index = 0; this.mnSocv1.MdiList = true; this.mnSocv1.Text = "1. &Sổ CV đến / CV đến"; this.mnSocv1.Click += new System.EventHandler(this.mnSocv1_Click); // // mnSocv2 // this.mnSocv2.Index = 1; this.mnSocv2.Text = "2. &Sổ CV đi / CV đi"; this.mnSocv2.Click += new System.EventHandler(this.mnSocv2_Click); // // mndonvitbtcCVden // this.mndonvitbtcCVden.Index = 2; this.mndonvitbtcCVden.Text = "3. &Đơn vị trong BTC / CV đến"; this.mndonvitbtcCVden.Click += new System.EventHandler(this.mndonvitbtcCVden_Click); // // mnphongban1 // this.mnphongban1.Index = 3; this.mnphongban1.Text = "4. &Phòng ban / CV đến"; this.mnphongban1.Click += new System.EventHandler(this.mnphongban1_Click); // // mnphongban2 // this.mnphongban2.Index = 4; this.mnphongban2.Text = "5. &Phòng ban / CV đi"; this.mnphongban2.Click += new System.EventHandler(this.mnphongban2_Click); // // mndonviNBTC1 // this.mndonviNBTC1.Index = 5; this.mndonviNBTC1.Text = "6. &Đơn vị ngoài BTC / CV đến"; this.mndonviNBTC1.Click += new System.EventHandler(this.mndonviNBTC1_Click); // // menuItem11 // this.menuItem11.Index = 4; this.menuItem11.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnXemCVdi, this.mnXemCVden, this.mnXemsoCVden, this.mnXemsoCVdi, this.mnbaocaoCVden, this.mnbaocaoCVdi}); this.menuItem11.Text = "&Báo cáo"; // // mnXemCVdi // this.mnXemCVdi.Index = 0; this.mnXemCVdi.MdiList = true; this.mnXemCVdi.Text = "1. &Xem, In Công văn đi"; this.mnXemCVdi.Click += new System.EventHandler(this.mnXemCVdi_Click); // // mnXemCVden // this.mnXemCVden.Index = 1; this.mnXemCVden.MdiList = true; this.mnXemCVden.Text = "2. &Xem, In Công văn đến"; this.mnXemCVden.Click += new System.EventHandler(this.mnXemCVden_Click); // // mnXemsoCVden // this.mnXemsoCVden.Index = 2; this.mnXemsoCVden.Text = "3. &Xem, In sổ giao Công văn đến"; this.mnXemsoCVden.Click += new System.EventHandler(this.mnXemsoCVden_Click); // // mnXemsoCVdi // this.mnXemsoCVdi.Index = 3; this.mnXemsoCVdi.Text = "4. &Xem, In sổ giao Công văn đi"; this.mnXemsoCVdi.Click += new System.EventHandler(this.mnXemsoCVdi_Click); // // mnbaocaoCVden // this.mnbaocaoCVden.Index = 4; this.mnbaocaoCVden.Text = "5. &Báo cáo Công văn đến"; this.mnbaocaoCVden.Click += new System.EventHandler(this.mnbaocaoCVden_Click); // // mnbaocaoCVdi // this.mnbaocaoCVdi.Index = 5; this.mnbaocaoCVdi.Text = "6. &Báo cáo Công văn đi"; this.mnbaocaoCVdi.Click += new System.EventHandler(this.mnbaocaoCVdi_Click); // // mnGioithieu // this.mnGioithieu.Index = 5; this.mnGioithieu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnGioithieu1, this.mnhuongdan}); this.mnGioithieu.Text = "&Trợ giúp"; // // mnGioithieu1 // this.mnGioithieu1.Index = 0; this.mnGioithieu1.MdiList = true; this.mnGioithieu1.Text = "&1. Giới thiệu chương trình"; this.mnGioithieu1.Click += new System.EventHandler(this.mnGioithieu1_Click); // // mnhuongdan // this.mnhuongdan.Index = 1; this.mnhuongdan.Text = "&2. Hướng dẫn sử dụng"; this.mnhuongdan.Click += new System.EventHandler(this.mnhuongdan_Click); // // saveFileDialog1 // this.saveFileDialog1.FileName = "doc1"; // // pictureBox1 // this.pictureBox1.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(216, 40); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(216, 48); this.pictureBox1.TabIndex = 3; this.pictureBox1.TabStop = false; this.pictureBox1.Visible = false; // // frmChinh // this.AutoScaleBaseSize = new System.Drawing.Size(8, 19); this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(592, 289); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.pictureBox1}); this.Font = new System.Drawing.Font(".VnTime", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.ForeColor = System.Drawing.SystemColors.ActiveCaptionText; this.IsMdiContainer = true; this.Menu = this.mainMenu1; this.Name = "frmChinh"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Quan ly cong van "; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.ResumeLayout(false); } #endregion /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.Run(new frmChinh()); } private void mndonviNBTC_Click(object sender,System.EventArgs e) { frmdonviNBTC f1 = new frmdonviNBTC(); f1.MdiParent = this; f1.Show(); } private void mndonviTBTC_Click(object sender,System.EventArgs e) { frmdonviTBTC f1 = new frmdonviTBTC(); f1.MdiParent = this; f1.Show(); } private void mnPhongban_Click(object sender,System.EventArgs e) { frmphongban f1 = new frmphongban(); f1.MdiParent = this; f1.Show(); } private void mnNSD_Click(object sender,System.EventArgs e) { frmNSD f1 = new frmNSD(); f1.MdiParent = this; f1.Show(); } private void mnSocongvandi_Click(object sender,System.EventArgs e) { frmsoCVdi f1 = new frmsoCVdi(); f1.MdiParent = this; f1.Show(); } private void mnCongvandi_Click(object sender,System.EventArgs e) { frmCVdi f1 = new frmCVdi(); f1.MdiParent = this; f1.Show(); } private void mnTimkiemCVdi_Click(object sender, System.EventArgs e) { frmtimkiemCVdi f1 = new frmtimkiemCVdi(); f1.MdiParent = this; f1.Show(); } private void frmChinh_Load(object sender, System.EventArgs e) { } private void mncnCVden_Click(object sender, System.EventArgs e) { frmcnCVden f1 = new frmcnCVden(); f1.MdiParent = this; f1.Show(); } private void mnNhapCongVanDen_Click(object sender, System.EventArgs e) { frmCVden f1 = new frmCVden(); f1.MdiParent = this; f1.Show(); } private void mncnCVdi_Click(object sender, System.EventArgs e) { frmcnCVdi f1 = new frmcnCVdi(); f1.MdiParent = this; f1.Show(); } private void mnsoCVden_Click(object sender, System.EventArgs e) { frmsoCVden f1 = new frmsoCVden(); f1.MdiParent = this; f1.Show(); } private void mntimkiemCVden_Click(object sender, System.EventArgs e) { frmtimkiemCVden f1 = new frmtimkiemCVden(); f1.MdiParent = this; f1.Show(); } private void mnXemCVdi_Click(object sender, System.EventArgs e) { frmbaocao1 f1 = new frmbaocao1(); f1.MdiParent = this; f1.Show(); } private void mnXemCVden_Click(object sender, System.EventArgs e) { frmbaocao2 f1 = new frmbaocao2(); f1.MdiParent = this; f1.Show(); } private void mnXemsoCVden_Click(object sender, System.EventArgs e) { frmbaocao3 f1 = new frmbaocao3(); f1.MdiParent = this; f1.Show(); } private void mnXemsoCVdi_Click(object sender, System.EventArgs e) { frmbaocao4 f1 = new frmbaocao4(); f1.MdiParent = this; f1.Show(); } private void mntimtrendia_Click(object sender, System.EventArgs e) { frmtimtrendia f1 = new frmtimtrendia(); f1.MdiParent = this; f1.Show(); } private void mnGioithieu1_Click(object sender, System.EventArgs e) { frmGioithieu f1 = new frmGioithieu(); f1.MdiParent = this; f1.Show(); } private void mnhuongdan_Click(object sender, System.EventArgs e) { frmhuongdan f1 = new frmhuongdan(); f1.MdiParent = this; f1.Show(); } private void miOpen_Click(object sender, System.EventArgs e) { openFileDialog1.ShowDialog(); } private void miSave_Click(object sender, System.EventArgs e) { saveFileDialog1.ShowDialog(); } private void mnSocv1_Click(object sender, System.EventArgs e) { frmsoCV1 f1 = new frmsoCV1(); f1.MdiParent = this; f1.Show(); } private void mnSocv2_Click(object sender, System.EventArgs e) { frmsoCV2 f1 = new frmsoCV2(); f1.MdiParent = this; f1.Show(); } private void mndonvitbtcCVden_Click(object sender, System.EventArgs e) { frmdonviTBTC1 f1 = new frmdonviTBTC1(); f1.MdiParent = this; f1.Show(); } private void mnphongban1_Click(object sender, System.EventArgs e) { frmPhongban1 f1 = new frmPhongban1(); f1.MdiParent = this; f1.Show(); } private void mnphongban2_Click(object sender, System.EventArgs e) { frmPhongban2 f1 =new frmPhongban2(); f1.MdiParent = this; f1.Show(); } private void mndonviNBTC1_Click(object sender, System.EventArgs e) { frmdonviNBTC11 f1 =new frmdonviNBTC11(); f1.MdiParent = this; f1.Show(); } private void mnDangki_Click(object sender, System.EventArgs e) { frmdangki f1 = new frmdangki(); f1.MdiParent = this; f1.Show(); } private void mnbaocaoCVden_Click(object sender, System.EventArgs e) { frmbaocao5 f1 = new frmbaocao5(); f1.MdiParent = this; f1.Show(); } private void mnbaocaoCVdi_Click(object sender, System.EventArgs e) { frmbaocao6 f1 = new frmbaocao6(); f1.MdiParent = this; f1.Show(); } private void Thoat_Click(object sender, System.EventArgs e) { if (MessageBox.Show ("Ban co muon thoat khoi chuong trinh khong?", "Quan ly cong van di", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Application.Exit(); } } private void menuItem2_Click(object sender, System.EventArgs e) { } private void menuItem3_Click(object sender, System.EventArgs e) { } private void menuItem5_Click(object sender, System.EventArgs e) { } private void menuItem8_Click(object sender, System.EventArgs e) { } private void mnHethong_Click(object sender, System.EventArgs e) { } private void menuItem3_Click_1(object sender, System.EventArgs e) { } } } Form danh mục các đơn vị ngoài Bộ using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Data.OleDb; namespace Tina { public class frmdonviNBTC : System.Windows.Forms.Form { private System.ComponentModel.Container components ; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; //private AxMSForms.AxFrame axFrame1; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private System.Windows.Forms.Button button5; private System.Windows.Forms.TextBox txtMaDonVi_NBTC; private System.Windows.Forms.TextBox txtTenDonVi; private System.Windows.Forms.Button btnUpdate; private System.Windows.Forms.Button btnClear; private System.Windows.Forms.Button btnAdd; private System.Windows.Forms.TextBox txtKyHieuDV; private System.Windows.Forms.Button btnRemove; private System.Windows.Forms.Button button1; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.RadioButton radioButton1; private System.Windows.Forms.RadioButton radioButton2; private System.Windows.Forms.ListBox lbdonviNBTC; public frmdonviNBTC( ) { InitializeComponent( ); // connect to qlcv Access database string connectionString = "provider=Microsoft.JET.OLEDB.4.0; " + "data source = c:\\Documents and Settings\\NGUYEN PHUONG HAO\\My Documents\\qlcv.mdb"; // get records from the customers table string commandString = "Select MaDonVi_NBTC, TenDonVi, KyHieuDV from DonviNBTC"; // create the data set command object // and the DataSet OleDbDataAdapter DataAdapter = new OleDbDataAdapter( commandString, connectionString); DataSet DataSet = new DataSet( ); // fill the data set object DataAdapter.Fill(DataSet,"DonviNBTC"); // Get the one table from the DataSet DataTable dataTable = DataSet.Tables[0]; // for each row in the table, display the info foreach (DataRow dataRow in dataTable.Rows) { lbdonviNBTC.Items.Add( dataRow["MaDonVi_NBTC"]+ ","+ dataRow["TenDonVi"] + ","+ dataRow["KyHieuDV"]); } } private void InitializeComponent( ) { System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmdonviNBTC)); this.lbdonviNBTC = new System.Windows.Forms.ListBox(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.txtMaDonVi_NBTC = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.txtTenDonVi = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.txtKyHieuDV = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); this.btnUpdate = new System.Windows.Forms.Button(); this.btnClear = new System.Windows.Forms.Button(); this.btnRemove = new System.Windows.Forms.Button(); this.btnAdd = new System.Windows.Forms.Button(); this.button5 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.radioButton1 = new System.Windows.Forms.RadioButton(); this.radioButton2 = new System.Windows.Forms.RadioButton(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // lbdonviNBTC // this.lbdonviNBTC.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.lbdonviNBTC.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.lbdonviNBTC.ItemHeight = 15; this.lbdonviNBTC.Location = new System.Drawing.Point(40, 240); this.lbdonviNBTC.Name = "lbdonviNBTC"; this.lbdonviNBTC.Size = new System.Drawing.Size(376, 94); this.lbdonviNBTC.TabIndex = 0; this.lbdonviNBTC.SelectedIndexChanged += new System.EventHandler(this.ItemChanged); // // label1 // this.label1.Font = new System.Drawing.Font(".Vn3DH", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label1.ForeColor = System.Drawing.Color.Red; this.label1.Location = new System.Drawing.Point(8, 8); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(560, 40); this.label1.TabIndex = 1; this.label1.Text = "Cập nhật danh sách đơn vị ngoài bộ tài chính"; // // label2 // this.label2.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label2.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label2.Location = new System.Drawing.Point(40, 48); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(48, 16); this.label2.TabIndex = 2; this.label2.Text = "Mã số :"; this.label2.Click += new System.EventHandler(this.label2_Click); // // txtMaDonVi_NBTC // this.txtMaDonVi_NBTC.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.txtMaDonVi_NBTC.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.txtMaDonVi_NBTC.Location = new System.Drawing.Point(88, 48); this.txtMaDonVi_NBTC.Name = "txtMaDonVi_NBTC"; this.txtMaDonVi_NBTC.Size = new System.Drawing.Size(64, 23); this.txtMaDonVi_NBTC.TabIndex = 6; this.txtMaDonVi_NBTC.Text = ""; // // label6 // this.label6.BackColor = System.Drawing.SystemColors.Info; this.label6.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label6.ForeColor = System.Drawing.SystemColors.ControlText; this.label6.Location = new System.Drawing.Point(8, 48); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(80, 16); this.label6.TabIndex = 8; this.label6.Text = "Tên đơn vị :"; // // txtTenDonVi // this.txtTenDonVi.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.txtTenDonVi.ForeColor = System.Drawing.SystemColors.InactiveCaption; this.txtTenDonVi.Location = new System.Drawing.Point(104, 16); this.txtTenDonVi.Name = "txtTenDonVi"; this.txtTenDonVi.Size = new System.Drawing.Size(208, 23); this.txtTenDonVi.TabIndex = 9; this.txtTenDonVi.Text = ""; // // label4 // this.label4.BackColor = System.Drawing.SystemColors.Info; this.label4.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label4.ForeColor = System.Drawing.SystemColors.ControlText; this.label4.Location = new System.Drawing.Point(8, 16); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(80, 16); this.label4.TabIndex = 10; this.label4.Text = "Ký hiệu ĐV :"; // // txtKyHieuDV // this.txtKyHieuDV.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.txtKyHieuDV.ForeColor = System.Drawing.SystemColors.InactiveCaption; this.txtKyHieuDV.Location = new System.Drawing.Point(104, 48); this.txtKyHieuDV.Name = "txtKyHieuDV"; this.txtKyHieuDV.Size = new System.Drawing.Size(72, 23); this.txtKyHieuDV.TabIndex = 11; this.txtKyHieuDV.Text = ""; // // label5 // this.label5.BackColor = System.Drawing.SystemColors.Info; this.label5.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label5.ForeColor = System.Drawing.SystemColors.ControlText; this.label5.Location = new System.Drawing.Point(8, 80); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(176, 16); this.label5.TabIndex = 12; this.label5.Text = "Chuyển đổi công văn khi gửi :"; this.label5.Click += new System.EventHandler(this.label5_Click); // // btnUpdate // this.btnUpdate.BackColor = System.Drawing.SystemColors.Control; this.btnUpdate.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.btnUpdate.ForeColor = System.Drawing.SystemColors.ControlText; this.btnUpdate.Location = new System.Drawing.Point(48, 208); this.btnUpdate.Name = "btnUpdate"; this.btnUpdate.Size = new System.Drawing.Size(72, 24); this.btnUpdate.TabIndex = 18; this.btnUpdate.Text = "&Cập nhật"; this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click_1); // // btnClear // this.btnClear.BackColor = System.Drawing.SystemColors.Control; this.btnClear.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.btnClear.ForeColor = System.Drawing.SystemColors.ControlText; this.btnClear.Location = new System.Drawing.Point(312, 208); this.btnClear.Name = "btnClear"; this.btnClear.Size = new System.Drawing.Size(72, 24); this.btnClear.TabIndex = 19; this.btnClear.Text = "&Xoá"; this.btnClear.Click += new System.EventHandler(this.btnClear_Click); // // btnRemove // this.btnRemove.BackColor = System.Drawing.SystemColors.Control; this.btnRemove.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.btnRemove.ForeColor = System.Drawing.SystemColors.ControlText; this.btnRemove.Location = new System.Drawing.Point(392, 208); this.btnRemove.Name = "btnRemove"; this.btnRemove.Size = new System.Drawing.Size(72, 24); this.btnRemove.TabIndex = 20; this.btnRemove.Text = "&Sửa"; this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click); // // btnAdd // this.btnAdd.BackColor = System.Drawing.SystemColors.Control; this.btnAdd.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.btnAdd.ForeColor = System.Drawing.SystemColors.ControlText; this.btnAdd.Location = new System.Drawing.Point(224, 208); this.btnAdd.Name = "btnAdd"; this.btnAdd.Size = new System.Drawing.Size(72, 24); this.btnAdd.TabIndex = 21; this.btnAdd.Text = "&Thêm"; this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); // // button5 // this.button5.BackColor = System.Drawing.SystemColors.Control; this.button5.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.button5.ForeColor = System.Drawing.SystemColors.Desktop; this.button5.Location = new System.Drawing.Point(480, 200); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(64, 40); this.button5.TabIndex = 22; this.button5.Text = "&Thoát"; this.button5.Click += new System.EventHandler(this.button5_Click); // // button1 // this.button1.BackColor = System.Drawing.SystemColors.Control; this.button1.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.button1.ForeColor = System.Drawing.SystemColors.ControlText; this.button1.Location = new System.Drawing.Point(136, 208); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(72, 24); this.button1.TabIndex = 23; this.button1.Text = "&Lưu"; // // pictureBox1 // this.pictureBox1.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(16, 128); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(16, 16); this.pictureBox1.TabIndex = 24; this.pictureBox1.TabStop = false; // // groupBox1 // this.groupBox1.BackColor = System.Drawing.Color.LemonChiffon; this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] { this.radioButton2, this.radioButton1, this.label4, this.txtTenDonVi, this.label6, this.txtKyHieuDV, this.label5}); this.groupBox1.ForeColor = System.Drawing.Color.Red; this.groupBox1.Location = new System.Drawing.Point(40, 80); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(328, 104); this.groupBox1.TabIndex = 25; this.groupBox1.TabStop = false; this.groupBox1.Text = "Chi tiết"; // // radioButton1 // this.radioButton1.Location = new System.Drawing.Point(184, 80); this.radioButton1.Name = "radioButton1"; this.radioButton1.Size = new System.Drawing.Size(40, 16); this.radioButton1.TabIndex = 13; this.radioButton1.Text = "Có"; // // radioButton2 // this.radioButton2.Location = new System.Drawing.Point(240, 80); this.radioButton2.Name = "radioButton2"; this.radioButton2.Size = new System.Drawing.Size(80, 16); this.radioButton2.TabIndex = 14; this.radioButton2.Text = "Không"; // // frmdonviNBTC // this.AutoScaleBaseSize = new System.Drawing.Size(6, 16); this.ClientSize = new System.Drawing.Size(592, 342); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.groupBox1, this.pictureBox1, this.button1, this.button5, this.btnAdd, this.btnRemove, this.btnClear, this.btnUpdate, this.txtMaDonVi_NBTC, this.label2, this.label1, this.lbdonviNBTC}); this.Font = new System.Drawing.Font(".VnTime", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.Name = "frmdonviNBTC"; this.Text = "Don vi ngoai Bo Tai Chinh"; this.Load += new System.EventHandler(this.frmdonviNBTC_Load); this.groupBox1.ResumeLayout(false); this.ResumeLayout(false); } private void DataChanged(object sender, System.EventArgs e) { if((txtMaDonVi_NBTC.Text!="")&&(txtTenDonVi.Text!="")&&(txtKyHieuDV.Text!="")) { if(btnAdd.Enabled == false) { btnAdd.Enabled=true; } if((btnUpdate.Enabled==false)&&(lbdonviNBTC.SelectedIndex!=-1)) { btnUpdate.Enabled = true; } } else { if(btnAdd.Enabled==true) { btnAdd.Enabled = false; } if(btnUpdate.Enabled==true) { btnUpdate.Enabled=false; } } } private void btnAdd_Click(object sender, System.EventArgs e) { string itmNew = txtMaDonVi_NBTC.Text +"'"+txtTenDonVi.Text + "'"+txtKyHieuDV.Text; lbdonviNBTC.Items.Add(itmNew); txtMaDonVi_NBTC.Text =""; txtTenDonVi.Text = ""; txtKyHieuDV.Text = ""; } private void ItemChanged(object sender, System.EventArgs e) { if(lbdonviNBTC.SelectedIndex!=-1) { string itmSelected = (string)lbdonviNBTC.SelectedItem; char[] cSeparator = new char[]{','}; string[] strFields = new string[]{}; strFields = itmSelected.Split(cSeparator); txtMaDonVi_NBTC.Text = strFields[0]; txtTenDonVi.Text = strFields[1].TrimStart(null); txtKyHieuDV.Text = strFields[2].TrimStart(null); btnRemove.Enabled = true; btnUpdate.Enabled = false; } else { txtMaDonVi_NBTC.Text = ""; txtTenDonVi.Text = ""; txtKyHieuDV.Text = ""; btnUpdate.Enabled = false; btnRemove.Enabled = false; } } private void btnRemove_Click(object sender, System.EventArgs e) { lbdonviNBTC.Items.Remove(lbdonviNBTC.SelectedIndex); lbdonviNBTC.SelectedIndex = -1; } private void btnUpdate_Click(object sender, System.EventArgs e) { lbdonviNBTC.Items[lbdonviNBTC.SelectedIndex] = txtMaDonVi_NBTC.Text+"'"+ txtTenDonVi.Text+"'"+txtKyHieuDV.Text; } private void btnClear_Click(object sender, System.EventArgs e) { lbdonviNBTC.SelectedIndex = -1; } private void frmdonviNBTC_Load(object sender, System.EventArgs e) { } private void button5_Click(object sender,System.EventArgs e) { this.Close(); } private void btnUpdate_Click_1(object sender, System.EventArgs e) { } private void axFrame1_Enter(object sender, System.EventArgs e) { } private void label7_Click(object sender, System.EventArgs e) { } private void axOptionButton1_Enter(object sender, System.EventArgs e) { } private void axFrame2_Enter(object sender, System.EventArgs e) { } private void label2_Click(object sender, System.EventArgs e) { } private void label5_Click(object sender, System.EventArgs e) { } private void label8_Click(object sender, System.EventArgs e) { } } }

Các file đính kèm theo tài liệu này:

  • docP0017.doc