public AssessedByTraineeVO GetByID(int id) { AssessedByTraineeVO vo = new AssessedByTraineeVO(); DataTable dt = Select("ID=" + id + ""); if (dt.Rows.Count > 0) { vo = b.ConvertObj(dt.Rows[0], new AssessedByTraineeVO()) as AssessedByTraineeVO; } 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) { AssessedByTraineeVO vo = b.ConvertObj(dt.Rows[0], new AssessedByTraineeVO()) as AssessedByTraineeVO; assessedID = vo.Id; } return(assessedID); }
public int Create(AssessedByTraineeVO vo) { int id; if (!dao.isExist(vo.Id.ToString())) { id = dao.Insert(vo); } else { id = dao.Update(vo); } return(id); }
public int Insert(AssessedByTraineeVO vo) { int lastInsertId = 0; try { lastInsertId = b.Insert("AssessedBy_Trainee", b.ConvertColName(vo), b.ConvertValueList(vo)); } catch (Exception ex) { throw ex; } return(lastInsertId); }
public int Update(AssessedByTraineeVO vo) { int accessByTraineeID = 0; try { b.Update("AssessedBy_Trainee", vo.Id.ToString(), b.ConvertColName(vo), b.ConvertValueList(vo)); accessByTraineeID = vo.Id; } catch (Exception ex) { throw ex; } return(accessByTraineeID); }