示例#1
0
        public void updateCRType(string id, croomtype crt)
        {
            croomtype dbcrt = database.croomtypes.First(data => data.idcroomtype == id);

            dbcrt = crt;
            database.SaveChanges();
        }
示例#2
0
 public static LessonType ConvertClassroomTypeToLessonType(croomtype type)
 {
     return(new LessonType
     {
         id = type.idcroomtype,
         name = type.name
     });
 }
示例#3
0
        public void deleteCRType(string id)
        {
            croomtype crt = database.croomtypes.First(data => data.idcroomtype == id);

            database.croomtypes.Remove(crt);
        }
示例#4
0
        public croomtype getCRType(string id)
        {
            croomtype crt = database.croomtypes.First(data => data.idcroomtype == id);

            return(crt);
        }
示例#5
0
 public void insertCRType(ref croomtype crt)
 {
     database.croomtypes.Add(crt);
     database.SaveChanges();
 }