//添加 private void BTAdd_Click(object sender, EventArgs e) { if (wxUser == null) { BathClass.printErrorMsg("需要选择赠送对象!"); return; } if (dgv.CurrentCell == null) { BathClass.printErrorMsg("需要选择赠送优惠券种类!"); return; } string number = TextNumber.Text.Trim(); if (number == "") { BathClass.printErrorMsg("需要输入赠送优惠券数量!"); TextNumber.SelectAll(); TextNumber.Focus(); return; } dgvExtend.Rows.Add(wxUser.openid, wxUser.nickname, dgv.CurrentRow.Cells[0].Value, dgv.CurrentRow.Cells[1].Value, TextNumber.Text); TextNumber.Text = "1"; }
private void MainForm_Load(object sender, EventArgs e) { TextNumber.SelectAll(); dgv_show(); }