private void btnAdd_Click(object sender, EventArgs e) { DataRow m_Row = m_DanTocCtrl.ThemDongMoi(); m_Row["MaDanToc"] = "DT" + quyDinh.LaySTT(dgvDantoc.Rows.Count + 1); m_Row["TenDanToc"] = ""; m_DanTocCtrl.ThemDanToc(m_Row); bdgDantoc.BindingSource.MoveLast(); }
private void bngThemmoi_Click_1(object sender, EventArgs e) { DataRow m_Row = m_NgheNghiepCtrl.ThemDongMoi(); m_Row["MaNgheNghiep"] = "NN" + quyDinh.LaySTT(dgvNN1.Rows.Count + 1); m_Row["TenNgheNghiep"] = ""; m_NgheNghiepCtrl.ThemNgheNghiep(m_Row); bdgNN.BindingSource.MoveLast(); }
private void bngThemmoi_Click(object sender, EventArgs e) { DataRow m_Row = m_TonGiaoCtrl.ThemDongMoi(); m_Row["MaTonGiao"] = "TG" + quyDinh.LaySTT(dgvTonGiao.Rows.Count + 1); m_Row["TenTonGiao"] = ""; m_TonGiaoCtrl.ThemTonGiao(m_Row); bdgTongiao.BindingSource.MoveLast(); }
private void bngThemmoi_Click(object sender, EventArgs e) { DataRow m_Row = m_ChucVuCtrl.ThemDongMoi(); m_Row["MaChucVu"] = "CV" + quyDinh.LaySTT(dgvChucVu.Rows.Count + 1); m_Row["TenChucVu"] = ""; m_ChucVuCtrl.ThemChucVu(m_Row); bdgChucVu.BindingSource.MoveLast(); }
private void btnAdd_Click(object sender, EventArgs e) { DataRow m_Row = m_DichVuCtrl.ThemDongMoi(); m_Row["MaDichVu"] = "DV" + quyDinh.LaySTT(dgvDichVu.Rows.Count + 1);; m_Row["TenDichVu"] = ""; m_Row["DonGia"] = 0; m_DichVuCtrl.ThemDichVu(m_Row); bdgDichVu.BindingSource.MoveLast(); }
private void bngThemmoi_Click(object sender, EventArgs e) { DataRow m_Row = m_NguoiDungCtrl.ThemDongMoi(); m_Row["MaND"] = "ND" + quyDinh.LaySTT(dgvND.Rows.Count + 1);; m_Row["MaLoaiND"] = ""; m_Row["TenND"] = ""; m_Row["TenDangNhap"] = ""; m_Row["MatKhau"] = ""; m_NguoiDungCtrl.ThemNguoiDung(m_Row); bdgND.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click_1(object sender, EventArgs e) { if (dGVNgheNghiep.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = true; } DataRow m_Row = m_NgheNghiepCtrl.ThemDongMoi(); m_Row["MaNghe"] = "NN" + quyDinh.LaySTT(dGVNgheNghiep.Rows.Count + 1); m_Row["TenNghe"] = ""; m_NgheNghiepCtrl.ThemNgheNghiep(m_Row); bindingNavigatorNgheNghiep.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (DGVNhanVien.RowCount == 0) { BindingNavigatorNhanVien.Enabled = true; } DataRow m_Row = m_NhanVienCtrl.ThemDongMoi(); m_Row["MaNV"] = "NV" + m_QuyDinh.LaySTT(DGVNhanVien.Rows.Count + 1); m_Row["HoTenNV"] = ""; m_Row["NgaySinh"] = DateTime.Today; m_Row["DiaChi"] = ""; m_Row["DienThoai"] = ""; m_Row["MaQuayGiaoDich"] = ""; m_NhanVienCtrl.ThemMoi(m_Row); BindingNavigatorNhanVien.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (DGVNhaCungCap.RowCount == 0) { BindingNavigatorNhaCungCap.Enabled = true; } DataRow m_Row = m_NhaCungCapCtrl.ThemDongMoi(); m_Row["MaNCC"] = "NCC" + m_QuyDinh.LaySTT(DGVNhaCungCap.Rows.Count + 1); m_Row["TenNCC"] = ""; m_Row["DiaChi"] = ""; m_Row["Email"] = ""; m_Row["Fax"] = ""; m_Row["DienThoai"] = ""; m_Row["GhiChu"] = ""; m_NhaCungCapCtrl.ThemMoi(m_Row); BindingNavigatorNhaCungCap.BindingSource.MoveLast(); }
private void bngThemmoi_Click(object sender, EventArgs e) { DataRow m_Row = m_NhanVienCtrl.ThemDongMoi(); m_Row["MaNhanVien"] = "NV" + quyDinh.LaySTT(dgvNhanVien.Rows.Count + 1); m_Row["TenNhanVien"] = ""; m_Row["GioiTinh"] = false; m_Row["NgaySinh"] = DateTime.Today; m_Row["MaChucVu"] = ""; m_NhanVienCtrl.ThemNhanVien(m_Row); bdgNhanVien.BindingSource.MoveLast(); }
private void bngThemmoi_Click(object sender, EventArgs e) { DataRow m_Row = m_NguoiDanCtrl.ThemDongMoi(); m_Row["MaNguoiDan"] = "ND" + quyDinh.LaySTT(dgvNguoiDan.Rows.Count + 1); m_Row["TenNguoiDan"] = ""; m_Row["GioiTinh"] = false; m_Row["NgaySinh"] = DateTime.MinValue; m_NguoiDanCtrl.ThemNguoiDan(m_Row); bdgNguoiDan.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (DGVDMLoaiGiaoDich.RowCount == 0) { BindingNavigatorDMLoaiGiaoDich.Enabled = true; } DataRow m_Row = m_LoaiGiaoDichCtrl.ThemDongMoi(); m_Row["MaLoaiGiaoDich"] = "LGD" + m_QuyDinh.LaySTT(DGVDMLoaiGiaoDich.Rows.Count + 1); m_Row["TenLoaiGiaoDich"] = ""; m_LoaiGiaoDichCtrl.ThemMoi(m_Row); BindingNavigatorDMLoaiGiaoDich.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (DGVMatHang.RowCount == 0) { BindingNavigatorMatHang.Enabled = true; } DataRow m_Row = m_MatHangCtrl.ThemDongMoi(); m_Row["MaPhieu"] = "NH" + m_QuyDinh.LaySTT(DGVMatHang.Rows.Count + 1); m_Row["MaMH"] = "MH" + m_QuyDinh.LaySTT(DGVMatHang.Rows.Count + 1); m_Row["TenMH"] = ""; m_Row["MaNCC"] = ""; m_Row["NgayNhap"] = DateTime.Today; m_Row["SoLuong"] = 0; m_Row["DonGia"] = 0; m_Row["GiaBan"] = 0; m_Row["MaLoaiGiaoDich"] = ""; m_Row["MaLoaiTien"] = ""; m_MatHangCtrl.ThemMoi(m_Row); BindingNavigatorMatHang.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (dGVHanhKiem.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = true; } DataRow m_Row = m_HanhKiemCtrl.ThemDongMoi(); m_Row["MaHanhKiem"] = "HK" + quyDinh.LaySTT(dGVHanhKiem.Rows.Count + 1); m_Row["TenHanhKiem"] = ""; m_HanhKiemCtrl.ThemHanhKiem(m_Row); bindingNavigatorHanhKiem.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (dGVKetQua.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = true; } DataRow m_Row = m_KetQuaCtrl.ThemDongMoi(); m_Row["MaKetQua"] = "KQ" + quyDinh.LaySTT(dGVKetQua.Rows.Count + 1); m_Row["TenKetQua"] = ""; m_KetQuaCtrl.ThemKetQua(m_Row); bindingNavigatorKetQua.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (dGVTonGiao.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = false; } DataRow m_Row = m_TonGiaoCtrl.ThemDongMoi(); m_Row["MaTonGiao"] = "TG" + quyDinh.LaySTT(dGVTonGiao.Rows.Count + 1); m_Row["TenTonGiao"] = ""; m_TonGiaoCtrl.ThemTonGiao(m_Row); bindingNavigatorTonGiao.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (dGVDanToc.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = true; } DataRow m_Row = m_DanTocCtrl.ThemDongMoi(); m_Row["MaDanToc"] = "DT" + quyDinh.LaySTT(dGVDanToc.Rows.Count + 1); m_Row["TenDanToc"] = ""; m_DanTocCtrl.ThemDanToc(m_Row); bindingNavigatorDanToc.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (DGVDatHang.RowCount == 0) { BindingNavigatorDatHang.Enabled = true; } DataRow m_Row = m_DatHangCtrl.ThemDongMoi(); m_Row["MaPhieu"] = "DH" + m_QuyDinh.LaySTT(DGVDatHang.Rows.Count + 1); m_Row["MaMH"] = ""; m_Row["MaKH"] = ""; m_Row["NgayDat"] = DateTime.Today; m_Row["SoLuong"] = 0; m_Row["GiaBan"] = 0; m_Row["ThanhTien"] = 0; m_Row["MaLoaiGiaoDich"] = ""; m_Row["MaLoaiTien"] = ""; m_Row["GhiChu"] = ""; m_Row["ThanhToan"] = false; m_DatHangCtrl.ThemMoi(m_Row); BindingNavigatorDatHang.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (dGVLoaiNguoiDung.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = true; } DataRow m_Row = m_LoaiNguoiDungCtrl.ThemDongMoi(); m_Row["MaLoai"] = "LND" + quyDinh.LaySTT(dGVLoaiNguoiDung.Rows.Count + 1); m_Row["TenLoaiND"] = ""; m_LoaiNguoiDungCtrl.ThemLoaiNguoiDung(m_Row); bindingNavigatorLoaiNguoiDung.BindingSource.MoveLast(); }
public String LayMaSoTietKiem() { String MaSo = ""; SoTietKiemData data = new SoTietKiemData(); DataTable tbl = data.LaySoTietKiem(); foreach (DataRow row in tbl.Rows) { String chuoi = row["MaSoTietKiem"].ToString(); string so = chuoi.Substring(3, 6); int TT = Convert.ToInt32(so); MaSo = "STK" + (m_QuyDinh.LaySTT(TT + 1)); } return(MaSo); }
public String LayPSTKTheoButToan() { String SoButToan = ""; PhatSinhTietKiemData data = new PhatSinhTietKiemData(); DataTable tbl = data.LayPhatSinhTietKiem(); foreach (DataRow row in tbl.Rows) { String chuoi = row["SoButToan"].ToString(); string so = chuoi.Substring(2, 6); int MaSo = Convert.ToInt32(so); SoButToan = "BT" + (m_QuyDinh.LaySTT(MaSo + 1)); } return(SoButToan); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (DGVKhachHang.RowCount == 0) { BindingNavigatorKhachHang.Enabled = true; } DataRow m_Row = m_KhachHangCtrl.ThemDongMoi(); m_Row["MaKH"] = "KH" + m_QuyDinh.LaySTT(DGVKhachHang.Rows.Count + 1);; m_Row["HoTen"] = ""; m_Row["DiaChi"] = ""; m_Row["DienThoai"] = ""; m_KhachHangCtrl.ThemMoi(m_Row); BindingNavigatorKhachHang.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (dGVMonHoc.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = true; } DataRow m_Row = m_MonHocCtrl.ThemDongMoi(); m_Row["MaMonHoc"] = "MH" + quyDinh.LaySTT(dGVMonHoc.Rows.Count + 1); m_Row["TenMonHoc"] = ""; m_Row["SoTiet"] = 0; m_Row["HeSo"] = 0; m_MonHocCtrl.ThemMonHoc(m_Row); bindingNavigatorMonHoc.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { //MaTK, NgayGiaoDich, MaPhongGD, MaNV, MaLoaiGD if (DGVChiTietPhatSinhGD.RowCount == 0) { BindingNavigatorChiTietPhatSinhGD.Enabled = true; } DataRow m_Row = m_ChiTietPhatSinhGDCtrl.ThemDongMoi(); m_Row["SoGiaoDich"] = ""; m_Row["SoButToan"] = "BT" + m_QuyDinh.LaySTT(DGVChiTietPhatSinhGD.Rows.Count + 1); m_Row["SoHieuTaiKhoanNo"] = ""; m_Row["SoHieuTaiKhoanCo"] = ""; m_Row["SoTien"] = 0; m_ChiTietPhatSinhGDCtrl.ThemMoi(m_Row); BindingNavigatorChiTietPhatSinhGD.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (dGVHocSinh.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = true; } DataRow m_Row = m_HocSinhCtrl.ThemDongMoi(); m_Row["MaHocSinh"] = "HS" + quyDinh.LaySTT(dGVHocSinh.Rows.Count + 1); m_Row["HoTen"] = ""; m_Row["GioiTinh"] = false; m_Row["NgaySinh"] = DateTime.Today; m_Row["NoiSinh"] = ""; m_HocSinhCtrl.ThemHocSinh(m_Row); bindingNavigatorHocSinh.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click_1(object sender, EventArgs e) { if (dGVGiaoVien.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = true; } DataRow m_Row = m_GiaoVienCtrl.ThemDongMoi(); m_Row["MaGiaoVien"] = "GV" + quyDinh.LaySTT(dGVGiaoVien.Rows.Count + 1); m_Row["TenGiaoVien"] = ""; m_Row["DiaChi"] = ""; m_Row["DienThoai"] = ""; m_Row["MaMonHoc"] = ""; m_GiaoVienCtrl.ThemGiaoVien(m_Row); bindingNavigatorGiaoVien.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { if (dGVHocLuc.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = true; } DataRow m_Row = m_HocLucCtrl.ThemDongMoi(); m_Row["MaHocLuc"] = "HL" + quyDinh.LaySTT(dGVHocLuc.Rows.Count + 1); m_Row["TenHocLuc"] = ""; m_Row["DiemCanTren"] = 0; m_Row["DiemCanDuoi"] = 0; m_Row["DiemKhongChe"] = 0; m_HocLucCtrl.ThemHocLuc(m_Row); bindingNavigatorHocLuc.BindingSource.MoveLast(); }
private void simpleButtonThem_Click(object sender, EventArgs e) { if (_isAddButton) { _Disable_Control(editing: true); DataRow m_Row = m_MonHocCtrl.ThemDongMoi(); m_Row["MaMonHoc"] = "MH" + quyDinh.LaySTT(dGVMonHoc.Rows.Count + 1); m_Row["TenMonHoc"] = ""; m_MonHocCtrl.ThemMonHoc(m_Row); bindingNavigatorMonHoc.BindingSource.MoveLast(); } else { _Disable_Control(editing: false); m_MonHocCtrl.HienThi(dGVMonHoc, bindingNavigatorMonHoc); } }
private void simpleButtonThem_Click(object sender, EventArgs e) { if (_isAddButton) { _Disable_Control(editing: true); DataRow m_Row = m_LoaiDiemCtrl.ThemDongMoi(); m_Row["MaLoaiKT"] = "LD" + quyDinh.LaySTT(dGVLoaiDiem.Rows.Count + 1); m_Row["TenLoaiKT"] = ""; m_Row["HeSo"] = 0; m_LoaiDiemCtrl.ThemLoaiDiem(m_Row); bindingNavigatorLoaiDiem.BindingSource.MoveLast(); } else { _Disable_Control(editing: false); m_LoaiDiemCtrl.HienThi(dGVLoaiDiem, bindingNavigatorLoaiDiem); } }