コード例 #1
0
ファイル: frmTonGiao.cs プロジェクト: phamtien1709/LTUD_Edit
        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();
        }
コード例 #2
0
        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();
        }