public bool Add(entity.ROOM r) { try { HOTELMANAGEMENTEntities hm = new HOTELMANAGEMENTEntities(); hm.ROOMs.Add(r); hm.SaveChanges(); return(true); } catch (Exception ex) { ex.ToString(); return(false); } }
public bool Add(Model.entity.SERVICE s) { HOTELMANAGEMENTEntities hm = new HOTELMANAGEMENTEntities(); try { hm.SERVICEs.Add(s); hm.SaveChanges(); return(true); } catch (Exception ex) { Console.WriteLine(ex.InnerException.Message); return(false); } }
public bool Add(Model.entity.EMPLOYEE e) { HOTELMANAGEMENTEntities hm = new HOTELMANAGEMENTEntities(); try { hm.EMPLOYEEs.Add(e); hm.SaveChanges(); return(true); } catch (Exception ex) { Console.WriteLine(ex.Message); return(false); } }