Beispiel #1
0
        public void SavePatientAdmission(tblPatientAdmission obj)
        {
            //obj.ID = 18;

            db.tblPatientAdmissions.Add(obj);
            db.SaveChanges();
        }
Beispiel #2
0
        public void UpdatePatientAdmission(tblPatientAdmission obj)
        {
            db.tblPatientAdmissions.Attach(obj);
            var update = db.Entry(obj);

            update.Property(x => x.Description).IsModified    = true;
            update.Property(x => x.DisChargeDate).IsModified  = true;
            update.Property(x => x.AdmissionDate).IsModified  = true;
            update.Property(x => x.HospitalRoomID).IsModified = true;
            update.Property(x => x.IsActive).IsModified       = true;
            db.SaveChanges();
        }