private void DeleteDetailsRow(int iRowIndex) { AreaInfo area = GetDetailsRowModel(iRowIndex); if (area == null) { return; } if (MessageBox.Show(string.Format("是否确认删除货位【{0}】?", area.AreaName), "确认删除", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.No) { return; } try { if (area.IsDel != 2) { string strErr = string.Empty; if (!Basic_Func.DeleteAreaByID(area, ref strErr)) { Common.Common_Func.ErrorMessage(strErr, "删除失败"); return; } } Common.Common_Func.ErrorMessage("删除货位成功", "删除成功"); } catch (Exception ex) { Common.Common_Func.ErrorMessage(ex.Message); } finally { GetListQueryData(); } }