示例#1
0
        public bool Insert(tblKET_QUA model)
        {
            tblKET_QUA dbEntry = context.tblKET_QUA.Find(model.MaSV, model.MaMon);

            if (dbEntry != null)
            {
                return(false);
            }
            context.tblKET_QUA.Add(model);
            context.SaveChanges();
            return(true);
        }
示例#2
0
        public bool Insert(tblGIANG_VIEN model)
        {
            tblGIANG_VIEN dbEntry = context.tblGIANG_VIEN.Find(model.MaGV);

            if (dbEntry != null)
            {
                return(false);
            }
            context.tblGIANG_VIEN.Add(model);
            context.SaveChanges();
            return(true);
        }
示例#3
0
        public bool Insert(tblKHOA model)
        {
            tblKHOA dbEntry = context.tblKHOAs.Find(model.MaKhoa);

            if (dbEntry != null)
            {
                return(false);
            }
            context.tblKHOAs.Add(model);
            context.SaveChanges();
            return(true);
        }
示例#4
0
        public bool Insert(tblMON model)
        {
            tblMON result = context.tblMONs.Find(model.MaMon);

            if (result != null)
            {
                return(false);
            }
            context.tblMONs.Add(model);
            context.SaveChanges();
            return(true);
        }
示例#5
0
        public bool Insert(tblLOP model)
        {
            tblLOP dbEntry = context.tblLOPs.Find(model.MaLop);

            if (dbEntry != null)
            {
                return(false);
            }
            context.tblLOPs.Add(model);
            context.SaveChanges();
            return(true);
        }