Exemplo n.º 1
0
        //编辑会员信息
        private void toolEditMember_Click(object sender, EventArgs e)
        {
            //if (m_thread != null && m_thread.IsAlive)
            //    m_thread.Abort();

            if (dgv.CurrentRow == null)
            {
                return;
            }

            int    row = dgv.CurrentCell.RowIndex;
            int    col = dgv.CurrentCell.ColumnIndex;
            string no  = dgv.CurrentRow.Cells[0].Value.ToString();
            var    ci  = db.CardInfo.FirstOrDefault(x => x.CI_CardNo == no);

            EditMemberForm editMemberForm = new EditMemberForm(db, ci);

            if (editMemberForm.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            //dgv_show();
            dgv.CurrentCell = dgv[col, row];
        }
Exemplo n.º 2
0
        //编辑会员信息
        private void toolEditMember_Click(object sender, EventArgs e)
        {
            //if (m_thread != null && m_thread.IsAlive)
            //    m_thread.Abort();

            if (dgv.CurrentRow == null)
                return;

            int row = dgv.CurrentCell.RowIndex;
            int col = dgv.CurrentCell.ColumnIndex;
            string no = dgv.CurrentRow.Cells[0].Value.ToString();
            var ci = db.CardInfo.FirstOrDefault(x=>x.CI_CardNo == no);

            EditMemberForm editMemberForm = new EditMemberForm(db, ci);
            if (editMemberForm.ShowDialog() != DialogResult.OK)
                return;

            //dgv_show();
            dgv.CurrentCell = dgv[col, row];
        }