private void DeleteListRow(int iRowIndex) { Preparation preparation = GetListRowModel(iRowIndex); if (preparation == null) { return; } if (MessageBox.Show(string.Format("是否确认删除制法【{0}】?", preparation.pCode), "确认删除", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.No) { return; } try { if (preparation.IsDel != 2) { string strErr = string.Empty; if (!Basic_Func.DeletePreparationByID(preparation, ref strErr)) { Common.Common_Func.ErrorMessage(strErr, "删除失败"); return; } } Common.Common_Func.ErrorMessage("删除制法成功", "删除成功"); } catch (Exception ex) { Common.Common_Func.ErrorMessage(ex.Message); } finally { GetListQueryData(); } }