Exemplo n.º 1
0
        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();
        }