Exemplo n.º 1
0
        public void LogResource(
            DataStore ds,
            string resourceName,
            DeployedResourceType type,
            CreatedBy createdBy,
            string createdAt,
            string resourceId = null,
            string tier       = null)
        {
            string tenantId          = ds.GetValue("PowerBITenantId");
            string subscriptionId    = ds.GetJson("SelectedSubscription")?["SubscriptionId"]?.ToString();
            string subscriptionName  = ds.GetJson("SelectedSubscription")?["DisplayName"]?.ToString();
            string resourceGroupName = ds.GetValue("SelectedResourceGroup");

            Dictionary <string, string> resourceParams = new Dictionary <string, string>();

            resourceParams.Add("tenantId", tenantId);
            resourceParams.Add("subscriptionId", subscriptionId);
            resourceParams.Add("subscriptionName", subscriptionName);
            resourceParams.Add("resourceGroupName", resourceGroupName);

            resourceParams.Add("resourceName", resourceName);
            resourceParams.Add("resourceType", type.ToString());
            resourceParams.Add("createdBy", createdBy.ToString());
            resourceParams.Add("createdAt", createdAt);
            resourceParams.Add("resourceId", resourceId);
            resourceParams.Add("tier", tier);

            this.LogEvent("LogResource", resourceParams);
        }
Exemplo n.º 2
0
        public string ToQueryString()
        {
            string returnString = "(";

            returnString += "'" + ParentId.ToString() + "', ";                                  // 1
            returnString += "'" + Title + "', ";                                                // 2
            returnString += "'" + ShortDescription + "', ";                                     // 3
            returnString += "'" + DetailedDescription + "', ";                                  // 4
            returnString += "'" + ParentProject.ToString() + "', ";                             // 5
            returnString += "'" + DateCreated.ToShortDateString() + "', ";                      // 6
            returnString += "'" + CreatedBy.ToString() + "', ";                                 // 7
            returnString += "'" + DateCompleted.ToShortDateString() + "', ";                    // 8
            returnString += "'" + CompletedBy.ToString() + "', ";                               // 9
            returnString += "'" + DeadLine.ToShortDateString() + "', ";                         //10
            returnString += "'" + Status + "'";                                                 //11

            return(returnString += ")");
        }         // End of ToQueryString()
 protected override Models.DailyGospel Parse()
 {
     return(new Models.DailyGospel
     {
         Id = ToInt(DailyReadingID),
         Source = Source.ToString(),
         DateOfGospel = ToDateTime(DateOfGospel),
         FirstReadingTitle = FirstReadingTitle.ToString(),
         FirstReadingContent = FirstReadingContent.ToString(),
         ResponsorialPsalmTitle = ResponsorialPsalmTitle.ToString(),
         ResponsorialPsalmContent = ResponsorialPsalmContent.ToString(),
         SecondReadingTitle = SecondReadingTitle.ToString(),
         SecondReadingContent = SecondReadingContent.ToString(),
         VerseBeforeGospelTitle = VerseBeforeGospelTitle.ToString(),
         VerseBeforeGospelContent = VerseBeforeGospelContent.ToString(),
         GospelTitle = GospelTitle.ToString(),
         GospelContent = GospelContent.ToString(),
         CreatedBy = CreatedBy.ToString(),
         DateCreated = ToDateTime(DateCreated)
     });
 }
Exemplo n.º 4
0
 protected override Models.DailyReflection Parse()
 {
     return(new Models.DailyReflection
     {
         Id = ToInt(DailyReflectionID),
         Source = Source.ToString(),
         DateOfReflection = ToDateTime(DateOfReflection),
         FirstContentTitle = FirstContentTitle.ToString(),
         FirstContent = FirstContent.ToString(),
         SecondContentTitle = SecondContentTitle.ToString(),
         SecondContent = SecondContent.ToString(),
         ThirdContentTitle = ThirdContentTitle.ToString(),
         ThirdContent = ThirdContent.ToString(),
         FourthContentTitle = FourthContentTitle.ToString(),
         FourthContent = FourthContent.ToString(),
         FifthContentTitle = FifthContentTitle.ToString(),
         FifthContent = FifthContent.ToString(),
         SixthContentTitle = SixthContentTitle.ToString(),
         SixthContent = SixthContent.ToString(),
         Prayer = Prayer.ToString(),
         CreatedBy = CreatedBy.ToString(),
         DateCreated = ToDateTime(DateCreated)
     });
 }