Esempio n. 1
0
 public CosmosDB_EF_FormSettingFacade(IFormSettingDao_EF formSettingDao_EF)
 {
     _metadataAccessor        = new MetadataAccessor();
     _formResponseCRUD        = new CosmosDBCRUD();
     _formSettingDao_EF       = formSettingDao_EF;
     _formSettingDao_CosmosDB = new FormSettingDao(formSettingDao_EF);
 }
        public bool PutResponseInfoData(FormResponseDetail formResponseDetail)
        {
            CosmosDBCRUD formResponseCRUD = new CosmosDBCRUD();
            var          formResponsePropertiesFlattenedList = formResponseDetail.ToFormResponsePropertiesFlattenedList();
            var          result = formResponseCRUD.SaveFormResponsePropertiesAsync(formResponsePropertiesFlattenedList).Result;

            return(true);
        }
        public string GetResponseInfoData(IResponseContext responseContext)
        {
            CosmosDBCRUD formResponseCRUD       = new CosmosDBCRUD();
            var          formResponseProperties = formResponseCRUD.GetHierarchicalResponseListByResponseId(responseContext, /*includeDeletedRecords=*/ true, /*excludeInProcessRecords=*/ true);
            var          formResponseDetail     = formResponseProperties != null?formResponseProperties.ToHierarchicalFormResponseDetail() : null;

            string response = JsonConvert.SerializeObject(formResponseDetail);

            return(response);
        }
Esempio n. 4
0
 public FormSettingDao(IFormSettingDao_EF formSettingDao_EF)
 {
     _metadataAccessor  = new MetadataAccessor();
     _formResponseCRUD  = new CosmosDBCRUD();
     _formSettingDao_EF = formSettingDao_EF;
 }