public ExternalTrainingAssessmentVO GetByID(int id) { ExternalTrainingAssessmentVO vo = new ExternalTrainingAssessmentVO(); DataTable dt = Select("ID=" + id + ""); if (dt.Rows.Count > 0) { vo = b.ConvertObj(dt.Rows[0], new ExternalTrainingAssessmentVO()) as ExternalTrainingAssessmentVO; } return(vo); }
public int GetByTrainingIdNAttendeeID(int id, int attendeeID) { int assessedID = 0; DataTable dt = Select("TrainingPlanDetailID=" + id + " and AttendeeID=" + attendeeID); if (dt.Rows.Count != 0) { ExternalTrainingAssessmentVO vo = b.ConvertObj(dt.Rows[0], new ExternalTrainingAssessmentVO()) as ExternalTrainingAssessmentVO; assessedID = vo.Id; } return(assessedID); }
public int Create(ExternalTrainingAssessmentVO vo) { int id; if (!dao.isExist(vo.Id.ToString())) { id = dao.Insert(vo); } else { id = dao.Update(vo); } return(id); }
public int Insert(ExternalTrainingAssessmentVO vo) { int lastInsertId = 0; try { lastInsertId = b.Insert("External_Training_Assessment", b.ConvertColName(vo), b.ConvertValueList(vo)); } catch (Exception ex) { throw ex; } return(lastInsertId); }
public int Update(ExternalTrainingAssessmentVO vo) { int updateID = 0; try { b.Update("External_Training_Assessment", vo.Id.ToString(), b.ConvertColName(vo), b.ConvertValueList(vo)); updateID = vo.Id; } catch (Exception ex) { throw ex; } return(updateID); }