override public void MapDataFields(System.Data.DataRow currentRow) { base.MapDataFields(currentRow); metricType = (Server.Core.Metrics.Enumerations.MetricType)((Int32)currentRow ["MetricType"]); dataType = (Server.Core.Metrics.Enumerations.MetricDataType)((Int32)currentRow ["DataType"]); minimumValue = (Decimal)currentRow["MinimumValue"]; maximumValue = (Decimal)currentRow["MaximumValue"]; costDataSource = (Enumerations.MetricCostDataSource)Convert.ToInt32(currentRow["CostDataSource"]); costClaimDateType = (Enumerations.MetricCostClaimDateType)Convert.ToInt32(currentRow["CostClaimDateType"]); costReportingPeriod = (Enumerations.MetricCostReportingPeriod)Convert.ToInt32(currentRow["CostReportingPeriod"]); costReportingPeriodValue = Convert.ToInt32(currentRow["CostReportingPeriodValue"]); costReportingPeriodQualifier = (Core.Enumerations.DateQualifier)Convert.ToInt32(currentRow["CostReportingPeriodQualifier"]); costWatermarkPeriod = (Enumerations.MetricCostWatermarkPeriod)Convert.ToInt32(currentRow["CostWatermarkPeriod"]); costWatermarkPeriodValue = Convert.ToInt32(currentRow["CostWatermarkPeriodValue"]); costWatermarkPeriodQualifier = (Core.Enumerations.DateQualifier)Convert.ToInt32(currentRow["CostWatermarkPeriodQualifier"]); return; }
override public void MapDataFields(System.Data.DataRow currentRow) { base.MapDataFields(currentRow); populationId = (Int64)currentRow["PopulationId"]; scheduleType = (Mercury.Server.Core.Population.Enumerations.PopulationActivityScheduleType)(Int32) currentRow["ScheduleType"]; scheduleValue = (Int32)currentRow["ScheduleValue"]; scheduleQualifier = (Mercury.Server.Core.Enumerations.DateQualifier)(Int32) currentRow["ScheduleQualifier"]; anchorDate = (Mercury.Server.Core.Population.Enumerations.PopulationActivityEventAnchorDate)(Int32) currentRow ["AnchorDate"]; Reoccurring = (Boolean)currentRow["IsReoccurring"]; performActionDateType = (Mercury.Server.Core.Population.Enumerations.PopulationActivityPerformActionDateType)(Int32) currentRow["PerformActionDateType"]; action = new Mercury.Server.Core.Action.Action(base.application); action.MapDataFields(String.Empty, currentRow); return; }
public void MapFromExtendedProperties(Dictionary <String, String> extendedProperties, String prefix = "DateCriteria") { if (extendedProperties.ContainsKey(prefix + ".DateTypeInt32")) { DateType = (Core.DataExplorer.Enumerations.DataExplorerEvaluationDateType)Convert.ToInt32(extendedProperties[prefix + ".DateTypeInt32"]); } if (extendedProperties.ContainsKey(prefix + ".StartDate")) { StartDate = Convert.ToDateTime(extendedProperties[prefix + ".StartDate"]); } if (extendedProperties.ContainsKey(prefix + ".EndDate")) { EndDate = Convert.ToDateTime(extendedProperties[prefix + ".EndDate"]); } if (extendedProperties.ContainsKey(prefix + ".StartDateVariableName")) { StartDateVariableName = extendedProperties[prefix + ".StartDateVariableName"]; } if (extendedProperties.ContainsKey(prefix + ".StartDateRelativeValue")) { StartDateRelativeValue = Convert.ToInt32(extendedProperties[prefix + ".StartDateRelativeValue"]); } if (extendedProperties.ContainsKey(prefix + ".StartDateRelativeQualifier")) { StartDateRelativeQualifier = (Core.Enumerations.DateQualifier)Convert.ToInt32(extendedProperties[prefix + ".StartDateRelativeQualifier"]); } if (extendedProperties.ContainsKey(prefix + ".EndDateVariableName")) { EndDateVariableName = extendedProperties[prefix + ".EndDateVariableName"]; } if (extendedProperties.ContainsKey(prefix + ".EndDateRelativeValue")) { EndDateRelativeValue = Convert.ToInt32(extendedProperties[prefix + ".EndDateRelativeValue"]); } if (extendedProperties.ContainsKey(prefix + ".EndDateRelativeQualifier")) { EndDateRelativeQualifier = (Core.Enumerations.DateQualifier)Convert.ToInt32(extendedProperties[prefix + ".EndDateRelativeQualifier"]); } return; }
override public void MapDataFields(System.Data.DataRow currentRow) { base.MapDataFields(currentRow); populationServiceEventId = (Int64)currentRow["PopulationServiceEventId"]; populationId = (Int64)currentRow["PopulationId"]; relativeDateValue = (Int32)currentRow["RelativeDateValue"]; relativeDateQualifier = (Mercury.Server.Core.Enumerations.DateQualifier)(Int32) currentRow["RelativeDateQualifier"]; status = (Mercury.Server.Core.Population.Enumerations.PopulationServiceEventStatus)(Int32) currentRow["Status"]; action = new Mercury.Server.Core.Action.Action(base.application); action.MapDataFields(String.Empty, currentRow); return; }
override public void MapDataFields(System.Data.DataRow currentRow) { base.MapDataFields(currentRow); relativeDateValue = (Int32)currentRow["RelativeDateValue"]; relativeDateQualifier = (Mercury.Server.Core.Enumerations.DateQualifier)(Int32) currentRow["RelativeDateQualifier"]; status = (Enumerations.ActivityStatus)(Int32) currentRow["Status"]; if (!(currentRow["ActionId"] is DBNull)) { action = new Mercury.Server.Core.Action.Action(base.application); action.MapDataFields(String.Empty, currentRow); } return; }
public override void MapDataFields(System.Data.DataRow currentRow) { base.MapDataFields(currentRow); populationId = IdFromSql(currentRow, "PopulationId"); serviceId = IdFromSql(currentRow, "ServiceId"); exclusionServiceId = IdFromSql(currentRow, "ExclusionServiceId"); anchorDate = (Mercury.Server.Core.Population.Enumerations.PopulationServiceEventAnchorDate)(Int32) currentRow["AnchorDate"]; anchorDateValue = Convert.ToInt32(currentRow["AnchorDateValue"]); scheduleDateValue = (Int32)currentRow["ScheduleDateValue"]; scheduleDateQualifier = (Mercury.Server.Core.Enumerations.DateQualifier)(Int32) currentRow ["ScheduleDateQualifier"]; Reoccurring = (Boolean)currentRow["IsReoccurring"]; System.Data.DataTable thresholdTable = application.EnvironmentDatabase.SelectDataTable("SELECT * FROM PopulationServiceEventThreshold WHERE PopulationServiceEventId = " + Id.ToString()); foreach (System.Data.DataRow thresholdRow in thresholdTable.Rows) { PopulationServiceEventThreshold threshold = new PopulationServiceEventThreshold(base.application); threshold.MapDataFields(thresholdRow); thresholds.Add(threshold); } return; }
override public void MapDataFields(System.Data.DataRow currentRow) { if (thresholdType == Mercury.Server.Core.Action.Enumerations.ActionThresholdType.NotSpecified) { throw new ApplicationException("Invalid Threshold Type Specified."); } base.MapDataFields(currentRow); id = (Int64)currentRow[thresholdType.ToString() + "ThresholdId"]; relativeDateValue = (Int32)currentRow["RelativeDateValue"]; relativeDateQualifier = (Mercury.Server.Core.Enumerations.DateQualifier)(Int32) currentRow["RelativeDateQualifier"]; status = (Enumerations.ActionThresholdStatus)(Int32) currentRow["Status"]; action = new Mercury.Server.Core.Action.Action(base.application); action.MapDataFields(String.Empty, currentRow); return; }
public override void MapDataFields(System.Data.DataRow currentRow) { String selectStatement = String.Empty; base.MapDataFields(currentRow); workflowId = (currentRow["WorkflowId"] is DBNull) ? 0 : (Int64)currentRow["WorkflowId"]; scheduleValue = (Int32)currentRow["ScheduleValue"]; scheduleQualifier = (Mercury.Server.Core.Enumerations.DateQualifier)(Int32) currentRow["ScheduleQualifier"]; thresholdValue = (Int32)currentRow["ThresholdValue"]; thresholdQualifier = (Mercury.Server.Core.Enumerations.DateQualifier)(Int32) currentRow["ThresholdQualifier"]; initialConstraintValue = (Int32)currentRow["InitialConstraintValue"]; initialConstraintQualifier = (Mercury.Server.Core.Enumerations.DateQualifier)(Int32) currentRow["InitialConstraintQualifier"]; initialMilestoneValue = (Int32)currentRow["InitialMilestoneValue"]; initialMilestoneQualifier = (Mercury.Server.Core.Enumerations.DateQualifier)(Int32) currentRow["InitialMilestoneQualifier"]; GetWorkViewId = (Int64)currentRow["GetWorkViewId"]; GetWorkUseGrouping = (Boolean)currentRow["GetWorkUseGrouping"]; // LOAD WORK QUEUE USER VIEWS selectStatement = "SELECT * FROM dbo.WorkQueueGetWorkUserView WHERE WorkQueueId = " + Id.ToString() + " ORDER BY SecurityAuthorityId, UserAccountName"; System.Data.DataTable userViewsTable = application.EnvironmentDatabase.SelectDataTable(selectStatement); getWorkUserViews = new List <WorkQueueGetWorkUserView> (); foreach (System.Data.DataRow currentUserViewRow in userViewsTable.Rows) { WorkQueueGetWorkUserView userView = new WorkQueueGetWorkUserView(application); userView.MapDataFields(currentUserViewRow); getWorkUserViews.Add(userView); } // ALWAYS LOAD WORK TEAMS selectStatement = "SELECT WorkQueueTeam.*, WorkTeam.WorkTeamName FROM WorkQueueTeam JOIN WorkTeam ON WorkQueueTeam.WorkTeamId = WorkTeam.WorkTeamId WHERE WorkQueueId = " + id.ToString() + " ORDER BY WorkTeamName"; System.Data.DataTable workTeamsTable = application.EnvironmentDatabase.SelectDataTable(selectStatement.ToString(), 0); foreach (System.Data.DataRow currentWorkTeamRow in workTeamsTable.Rows) { WorkQueueTeam team = new WorkQueueTeam(application); team.MapDataFields(currentWorkTeamRow); workTeams.Add(team); } return; }
public void MapDataFields(System.Data.DataRow currentRow) { populationMembershipId = (Int64)currentRow["PopulationMembershipId"]; serviceId = (Int64)currentRow["ServiceId"]; serviceName = (String)currentRow["ServiceName"]; if (currentRow["ExpectedEventDate"] is DBNull) { expectedEventDate = null; } else { expectedEventDate = (DateTime)currentRow["ExpectedEventDate"]; } if (currentRow["EventDate"] is DBNull) { eventDate = null; } else { eventDate = (DateTime)currentRow["EventDate"]; } if (currentRow["PreviousThresholdDate"] is DBNull) { previousThresholdDate = null; } else { previousThresholdDate = (DateTime)currentRow["PreviousThresholdDate"]; } if (currentRow["NextThresholdDate"] is DBNull) { nextThresholdDate = null; } else { nextThresholdDate = (DateTime)currentRow["NextThresholdDate"]; } status = (Mercury.Server.Core.Population.Enumerations.PopulationServiceEventStatus)(Int32) currentRow["Status"]; switch (status) { case Enumerations.PopulationServiceEventStatus.CompliantOrNoChange: statusText = "Compliant"; break; case Enumerations.PopulationServiceEventStatus.Open: statusText = "Open"; break; case Enumerations.PopulationServiceEventStatus.OpenInformational: statusText = "Open - Informational"; break; case Enumerations.PopulationServiceEventStatus.OpenWarning: statusText = "Open - Warning"; break; case Enumerations.PopulationServiceEventStatus.OpenCritical: statusText = "Open - Critical"; break; default: statusText = "Open - Unknown"; break; } scheduleValue = (Int32)currentRow["ScheduleValue"]; scheduleQualifier = (Mercury.Server.Core.Enumerations.DateQualifier)(Int32) currentRow["ScheduleQualifier"]; Reoccurring = (Boolean)currentRow["Reoccurring"]; return; }