コード例 #1
0
        public ActionResult Index(DefaultIndex form, string returnUrl)
        {
            var user = Database.Session.Query <Admin_Kullanici>().FirstOrDefault(u => u.KullaniciAdi == form.Username);


            if (user == null || user.Parola != form.Password)
            {
                ModelState.AddModelError("Username", "Username or password is invalid !");
            }

            if (!ModelState.IsValid)
            {
                return(View(form));
            }

            FormsAuthentication.SetAuthCookie(form.Username, true);

            if (!String.IsNullOrWhiteSpace(returnUrl))
            {
                return(Redirect(returnUrl));
            }
            else
            {
                return(RedirectToAction("Home"));
            }
        }
コード例 #2
0
        public WordCreator(PatientMV pp, DBConn conn)
        {
            if (pp == null || conn == null)
            {
                return;
            }
            dB            = conn;
            _patient      = pp;
            _defaultIndex = new DefaultIndex
            {
                Height = _patient.Patient.Height,
                Weight = _patient.Patient.Weigth,
                LastDiastolSizeLeftStomach    = _patient.PatienValue?.LastDiastolSizeLeftStomach,
                ThicknessLowerWallLeftStomach = _patient.PatienValue?.ThicknessLowerWallLeftStomach,
                Arise = _patient.Aorta?.Arise,
                //LastVolumeLJRSF = _patient.RightStomachFunction?.LastVolumeLJ,
                ThicknessMejPereMJP = _patient.PatienValue?.ThicknessMejPereMJP,
                KDO    = _patient.RightStomachFunction?.LastVolumeLJ,
                LP     = _patient.PatienValue?.LeftAtrium,
                Volume = _patient.RightStomachFunctionAddition?.MaxValomeLeftAtrium,
                AverageGradientAortValue           = _patient.RightStomachFunction?.AverageGradientAortValue,
                AverageGradientPressureTrucuspidil = _patient.RightStomachFunction?.AverageGradientPressureTrucuspidil,
                AverageGradientMitralValve         = _patient.LeftStomachFunction?.AverageGradientMitralValve,
                MaxGradientAortValue               = _patient.RightStomachFunction?.MaxGradientAortValue,
                MaxGradientTricuspidil             = _patient.RightStomachFunction?.MaxGradientTricuspidil,
                MaxGradientLeftStomach             = _patient.RightStomachFunction?.MaxGradientLeftStomach,
                MaxGradientMitralValve             = _patient.LeftStomachFunction?.MaxGradientMitralValve,
                MaxGradientPressurePulmonaryArtery = _patient.PatienValue?.MaxGradientPressurePulmonaryArtery,
                RightAtriumVolume = _patient.RightStomachFunctionAddition?.MaxValomeRightAtrium
            };
            _patient.LeftStomachMV = new LeftStomachMV
            {
                LastDiastolSizeLeftStomach    = _patient.PatienValue?.LastDiastolSizeLeftStomach,
                LastSislotSizeLeftStomach     = _patient.PatienValue?.LastSislotSizeLeftStomach,
                RelativeThicknessLeftStomach  = _patient.PatienValue?.RelativeThicknessLeftStomach,
                ThicknessLowerWallLeftStomach = _patient.PatienValue?.ThicknessLowerWallLeftStomach,
                ThicknessMejPereMJP           = _patient.PatienValue?.ThicknessMejPereMJP,
                ThicknessSegment     = _patient.PatienValue?.ThicknessSegment,
                MovementMJP          = _patient.PatienValue?.MovementMJP,
                FractionAcceleration = _patient.PatienValue?.FractionAcceleration,
                FVRSF        = _patient.RightStomachFunction?.FV,
                LastVolumeLJ = _patient.RightStomachFunction?.LastVolumeLJ,
                INS          = _patient.PatienValue?.INS,
                UOK          = _patient.RightStomachFunction?.UOK
            };
            _patient.Dopper = new Dopper
            {
                Aortha      = _patient.RightStomachFunction?.VelocityAortValve,
                LeaveTract  = _patient.RightStomachFunction?.VelocityLeftStomach,
                MitralValve = _patient.LeftStomachFunction?.PickE,
                TricValve   = _patient.RightStomachFunction?.PickE,
                ValveLight  = _patient.PatienValue?.VelocityVavlvePulmonaryArtery
            };
            _patient.LightValve = new LightValve
            {
                MaxGradientTricuspidil = _patient.RightStomach?.MaxGradientTricuspidil,
                PressurePP             = _patient.RightStomach?.PressurePP,
                SistolPressureLA       = _patient.RightStomach?.SistolPressureLA
            };
            _patient.DiametrNpv = new DiametrNpv
            {
                CollNPV  = _patient.RightStomach?.SelectedColl,
                WidthNPV = _patient.RightStomach?.Width
            };

            _patient.LeftAtrium = new LeftAtrium
            {
                LP     = _patient.PatienValue?.LeftAtrium,
                Volume = _patient.RightStomachFunctionAddition?.MaxValomeLeftAtrium
            };
            _patient.RightAtrium = new RightAtrium
            {
                RightAtriumVolume = _patient.RightStomachFunctionAddition?.MaxValomeRightAtrium
            };
            _patient.CommentaryMV = new CommentaryMV
            {
                Commentary = _patient.Patient?.Commentary
            };
            _defaultIndex.Initialize();
            _patient.LeftStomachMV.WeightMokardLj = _defaultIndex.indexes["Mass"];
            date         = _patient.Patient.ResearchDateTime.ToString().Replace(" ", "_").Replace(":", "_");
            _patientName = string.IsNullOrWhiteSpace(_patient.Patient.FIO) ? date : $"{_patient.Patient.FIO}_{date}";
            var gender = _patient.Patient.Jender == "Ж" ? Gender.Female : Gender.Male;

            normaStorage = new NormaStorage(gender, pp.Patient.ChildAgeCode);
            CreateFolder();
        }
コード例 #3
0
 private static int ResolveDefaultIndex(string @string, DefaultIndex @default) => @default switch
 {