public HttpResponseMessage AddTeam(PM_EM_TEAM definitions) { definitions.TeamGuid = Guid.NewGuid(); definitions.RowDeleted = false; definitions.CreatedOn = DateTime.Now; IList <PM_EM_TEAM> list = new List <PM_EM_TEAM>(); PM_EM_TEAM_QueryParam team = new PM_EM_TEAM_QueryParam(); team.TeamName = definitions.TeamName; list = teamBO.GetEntities(team); if (list == null || list.Count == 0) { PM_EM_TEAM mmExt = teamBO.Insert(definitions); if (mmExt != null) { return(Request.CreateResponse(HttpStatusCode.OK, "新增成功")); } else { return(Request.CreateResponse(HttpStatusCode.InternalServerError, "新增失败")); } } else { return(Request.CreateResponse(HttpStatusCode.OK, "该班组已经存在")); } }
public string GetTeamStaticList(GetTeamStaticListM entity) { string retstr = "ok"; IPM_EM_TEAMBO ibo = ObjectContainer.BuildUp <IPM_EM_TEAMBO>(); IList <PM_EM_TEAM> list = new List <PM_EM_TEAM>(); if (entity != null) { try { PM_EM_TEAM_QueryParam ent = new PM_EM_TEAM_QueryParam(); ent.LineID = entity.Static; ent.TeamLeaderCardID = entity.User; list = ibo.GetEntities(ent); if (list == null || list.Count == 0) { retstr = "没有查看的权限!"; } } catch (Exception e) { throw e; } } else { return(null); } return(retstr); }
public IList <PM_EM_TEAM> GetAllClassTeam() { PM_EM_TEAM_QueryParam teamQueryModel = new PM_EM_TEAM_QueryParam(); teamQueryModel.RowDeleted = false; IList <PM_EM_TEAM> emTeamList = emTeamBo.GetEntities(teamQueryModel); return(emTeamList); }
public IList <PM_EM_TEAM> GetUserTeam(string UserID) { PM_EM_TEAM_QueryParam teamQueryModel = new PM_EM_TEAM_QueryParam(); teamQueryModel.RowDeleted = false; teamQueryModel.TeamLeaderCardID = UserID; IList <PM_EM_TEAM> emTeamList = emTeamBo.GetEntities(teamQueryModel); return(emTeamList); }