private void btnDishInfoAdd_Click(object sender, EventArgs e) { frmDishInfoOperate myfrmDishInfoOperate = new frmDishInfoOperate(); paramField = string.Empty; if (myfrmDishInfoOperate.ShowDialog() == DialogResult.OK) { BindGridControl(paramField, paramDishType); } }
private void btnDishInfoAlter_Click(object sender, EventArgs e) { if (this.gridViewDishInfo.SelectedRowsCount <= 0) { XtraMessageBox.Show("请先选择要修改(&U)的项", "操作违规", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } tempInfo = ClassAssist.CommonOperator.GetGVSelectRowInfo(this.gridViewDishInfo); if (tempInfo != null) { frmDishInfoOperate myfrmDishInfoOperate = new frmDishInfoOperate(tempInfo); paramField = string.Empty; if (myfrmDishInfoOperate.ShowDialog() == DialogResult.OK) { BindGridControl(paramField, paramDishType); } } }