示例#1
0
文件: Main.cs 项目: ritacc/RitaccTest
 private void btnAdd_Click(object sender, EventArgs e)
 {
     frmTMEdit edit = new frmTMEdit();
     edit.Owner = this;
     edit.OpType = "add";
     edit.ShowDialog();
     if (edit.IsReutrn)
         BindGridView();
 }
示例#2
0
文件: Main.cs 项目: ritacc/RitaccTest
        private void btnEdit_Click(object sender, EventArgs e)
        {
            DataGridViewSelectedRowCollection gv = this.dgPhone.SelectedRows;
            if (gv.Count == 0)
            {
                MessageBox.Show("��ѡ���¼��", "����", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            string id = gv[0].Cells[0].Value.ToString();
            if (string.IsNullOrEmpty(id))
            {
                MessageBox.Show("��ѡ���¼��", "����", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            frmTMEdit edit = new frmTMEdit();
            edit.OpType = "edit";
            edit.ID = id;
            edit.ShowDialog();
            if (edit.IsReutrn)
                BindGridView();
        }