public string PutClassStudentMap(ClassStudentMapEntity entity) { try { if (entity == null) { return("error"); } ClassStudentMapManager manager = new ClassStudentMapManager(); entity.CreateTime = DateTime.Now; entity.CreateTime = DateTime.Now; manager.Update(entity); return("success"); } catch (Exception e) { return(e.ToString()); } }
public string DeleteClassStudentMap(int id) { try { ClassStudentMapManager manager = new ClassStudentMapManager(); ClassStudentMapEntity entity = manager.GetClassStudentMapByID(id); if (entity != null) { entity.Valid = "F"; entity.CreateTime = DateTime.Now; entity.CreateTime = DateTime.Now; manager.Update(entity); } return("success"); } catch (Exception e) { return(e.ToString()); } }