public string DeleteClassInfo(int id) { try { ClassInfoManager manager = new ClassInfoManager(); ClassInfoEntity entity = manager.GetClassInfoByID(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()); } }
public string GetClassInfoByID(int id) { ClassInfoManager manager = new ClassInfoManager(); return(new JavaScriptSerializer().Serialize(manager.GetClassInfoByID(id))); }