示例#1
0
 /// <summary>
 /// 是否确认关闭
 /// </summary>
 /// <returns>不处理</returns>
 public override int Submit()
 {
     if (m_selectStaffWindow != null)
     {
         ProjectService projectService   = DataCenter.ProjectService;
         List <GridRow> selectedRows     = m_gridProjects.SelectedRows;
         int            selectedRowsSize = selectedRows.Count;
         if (selectedRowsSize > 0)
         {
             String      newJobID = m_selectStaffWindow.GetSelectedJobIDs();
             ProjectInfo project  = projectService.GetProject(selectedRows[0].GetCell("colP1").GetString());
             if (m_curColName == "colP3" || m_curColName == "colP4")
             {
                 project.m_jobIds = newJobID;
             }
             else if (m_curColName == "colP5" || m_curColName == "colP6")
             {
                 project.m_center = newJobID;
             }
             projectService.Save(project);
             AddProjectToGrid(project);
         }
         m_selectStaffWindow = null;
     }
     return(0);
 }
示例#2
0
        /// <summary>
        /// 单元格点击方法
        /// </summary>
        /// <param name="sender">调用者</param>
        /// <param name="cell">单元格</param>
        /// <param name="mp">坐标</param>
        /// <param name="button">按钮</param>
        /// <param name="clicks">点击次数</param>
        /// <param name="delta">滚轮值</param>
        private void GridCellClick(object sender, GridCell cell, POINT mp, MouseButtonsA button, int clicks, int delta)
        {
            String colName = cell.Column.Name;

            if (colName == "colP2" || colName == "colP3")
            {
                m_selectStaffWindow        = new SelectStaffWindow(Native);
                m_selectStaffWindow.Parent = this;
                m_selectStaffWindow.BindJobIdsToResultGrid(cell.Row.GetCell("colP2").GetString());
                m_selectStaffWindow.ShowDialog();
            }
        }
示例#3
0
 /// <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);
 }