/// <summary> /// 添加 /// </summary> public void Add() { AwardService awardService = DataCenter.AwardService; AwardInfo award = new AwardInfo(); award.m_ID = awardService.GetNewID(); awardService.Save(award); AddAwardToGrid(award); m_gridAwards.Update(); if (m_gridAwards.VScrollBar != null) { m_gridAwards.VScrollBar.ScrollToEnd(); } m_gridAwards.Invalidate(); }
/// <summary> /// 是否确认关闭 /// </summary> /// <returns>不处理</returns> public override int Submit() { if (m_selectStaffWindow != null) { AwardService awardService = DataCenter.AwardService; List <GridRow> selectedRows = m_gridAwards.SelectedRows; int selectedRowsSize = selectedRows.Count; if (selectedRowsSize > 0) { String newJobID = m_selectStaffWindow.GetSelectedJobIDs(); AwardInfo award = awardService.GetAward(selectedRows[0].GetCell("colP1").GetString()); award.m_name = newJobID; awardService.Save(award); AddAwardToGrid(award); } m_selectStaffWindow = null; } return(0); }