private string GetMcdtUnits(int unitId, int mcdtId)
        {
            MCDT mcdt = db.MCDTs.Find(mcdtId);

            db.Entry(mcdt).Reference(x => x.MCDT_units).Load();
            string units = mcdt.MCDT_units.Description;

            return(units);
        }
示例#2
0
        /// <summary>
        /// first step --add mcdt
        /// second step- add mcdt_staff_manager considering null staff to be later filled by labTec
        /// third step- add mcdt-staff-manager to the MCDT manager
        /// </summary>
        /// <param name="mcdt"></param>
        private void SavePrescribedMcdtAUX(MCDT mcdt)
        {
            MCDTStaffManager MCDT_staffManager = db.MCDTStaffManagers.Add(new MCDTStaffManager {
                mcdt = mcdt
            });

            MCDTManager mcdtManager = db.MCDTManagers.Add(
                new MCDTManager {
                MCDTStaffManager = MCDT_staffManager, clinicRegistryManager = SingletonClinicRegistry.GetInstance(db)
            });

            db.SaveChanges();
        }