//管理员——删除场地通知 public bool del_cd_note(String noteid2) { try { YardContent Del_cd_note = new YardContent(); Del_cd_note.NoteID = int.Parse(noteid2); chloe_connect.Delete(Del_cd_note); MessageBox.Show("删除成功!"); return(true); } catch (Exception e) { Console.WriteLine(e.ToString()); MessageBox.Show("删除失败!"); return(false); } }
//管理员——录入场地通知 public bool inser_yardcontent(int noteid, String title, String information, DateTime notetime) { try { YardContent yardcontent_to_insert = new YardContent(); yardcontent_to_insert.NoteID = noteid; yardcontent_to_insert.Title = title; yardcontent_to_insert.Information = information; yardcontent_to_insert.NoteTime = DateTime.Now; chloe_connect.Insert(yardcontent_to_insert); MessageBox.Show("录入成功!"); return(true); } catch (Exception e) { Console.WriteLine(e.ToString()); MessageBox.Show("录入失败!"); return(false); } }