/// <summary>
        /// Сохранить список карт обследования
        /// </summary>
        /// <param name="saveBrachialPlexusCardInfo">Информация о карте, которую сохраняем</param>
        private void Save(CBrachialPlexusCard saveBrachialPlexusCardInfo)
        {
            var brachialPlexusCardsStr = new StringBuilder();

            foreach (CBrachialPlexusCard brachialPlexusCardInfo in _brachialPlexusCardList)
            {
                brachialPlexusCardsStr.Append(
                    "HospitalizationId=" + brachialPlexusCardInfo.HospitalizationId + DataSplitStr +
                    "VisitId=" + brachialPlexusCardInfo.VisitId + DataSplitStr +
                    "Diaphragm=" + brachialPlexusCardInfo.Diaphragm + DataSplitStr +
                    "EMNG=" + brachialPlexusCardInfo.EMNG + DataSplitStr +
                    "EMNGDate=" + CConvertEngine.DateTimeToString(brachialPlexusCardInfo.EMNGDate) + DataSplitStr +
                    "HornersSyndrome=" + brachialPlexusCardInfo.HornersSyndrome + DataSplitStr +
                    "IsEMNGEnabled=" + brachialPlexusCardInfo.IsEMNGEnabled + DataSplitStr +
                    "IsMyelographyEnabled=" + brachialPlexusCardInfo.IsMyelographyEnabled + DataSplitStr +
                    "Myelography=" + brachialPlexusCardInfo.Myelography + DataSplitStr +
                    "MyelographyDate=" + CConvertEngine.DateTimeToString(brachialPlexusCardInfo.MyelographyDate) + DataSplitStr +
                    "MyelographyType=" + brachialPlexusCardInfo.MyelographyType + DataSplitStr +
                    "TinelsSymptom=" + brachialPlexusCardInfo.TinelsSymptom + DataSplitStr +
                    "VascularStatus=" + brachialPlexusCardInfo.VascularStatus + DataSplitStr +
                    "CardSide=" + brachialPlexusCardInfo.SideOfCard + ObjSplitStr);

                if (saveBrachialPlexusCardInfo != null && saveBrachialPlexusCardInfo.IsEqual(brachialPlexusCardInfo))
                {
                    CDatabaseEngine.SaveBitmapToFile(
                        brachialPlexusCardInfo.Picture,
                        GetPicturePath(brachialPlexusCardInfo.GetPictureFileName()));
                }
            }

            CDatabaseEngine.PackText(brachialPlexusCardsStr.ToString(), _brachialPlexusCardPath);
        }
예제 #2
0
        /// <summary>
        /// Поместить в файл с картинкой дефолтную картинку, для указанного типа карты
        /// </summary>
        /// <param name="cardType">Тип карты</param>
        /// <param name="picturePath">Полный путь до файла с картинкой</param>
        private static void PutDefaultPictureFile(CardType cardType, string picturePath)
        {
            switch (cardType)
            {
            case CardType.HandCutaneousNerves:
                CDatabaseEngine.SaveBitmapToFile(Properties.Resources.CardHandCutaneousNerves, picturePath);
                break;

            case CardType.HandDermatome:
                CDatabaseEngine.SaveBitmapToFile(Properties.Resources.CardHandDermatome, picturePath);
                break;

            case CardType.LegCutaneousNerves:
                CDatabaseEngine.SaveBitmapToFile(Properties.Resources.CardLegCutaneousNerves, picturePath);
                break;

            case CardType.LegDermatome:
                CDatabaseEngine.SaveBitmapToFile(Properties.Resources.CardLegDermatome, picturePath);
                break;

            case CardType.PamplegiaCard:
                CDatabaseEngine.SaveBitmapToFile(Properties.Resources.CardPamplegiaCard, picturePath);
                break;

            case CardType.SacriplexCard:
                CDatabaseEngine.SaveBitmapToFile(Properties.Resources.CardSacriplexCard, picturePath);
                break;
            }
        }
예제 #3
0
        /// <summary>
        /// Сохранить список карт обследования
        /// </summary>
        /// <param name="saveCardInfo">Информация о карте, которую сохраняем</param>
        private void Save(CCard saveCardInfo)
        {
            var cardsStr = new StringBuilder();

            foreach (CCard cardInfo in _cardList)
            {
                cardsStr.Append(
                    "HospitalizationId=" + cardInfo.HospitalizationId + DataSplitStr +
                    "VisitId=" + cardInfo.VisitId + DataSplitStr +
                    "CardSide=" + cardInfo.CurrentSideOfCard + DataSplitStr +
                    "CurrentCardType=" + cardInfo.CurrentCardType + ObjSplitStr);

                if (saveCardInfo != null && saveCardInfo.IsEqual(cardInfo))
                {
                    CDatabaseEngine.SaveBitmapToFile(
                        cardInfo.Picture,
                        GetPicturePath(cardInfo.GetPictureFileName()));
                }
            }

            CDatabaseEngine.PackText(cardsStr.ToString(), _cardPath);
        }
 /// <summary>
 /// Поместить в файл с картинкой дефолтную картинку
 /// </summary>
 /// <param name="picturePath">Полный путь до файла с картинкой</param>
 private static void PutDefaultPictureFile(string picturePath)
 {
     CDatabaseEngine.SaveBitmapToFile(Properties.Resources.CardMainSchema, picturePath);
 }