Mike Phares b1c6903c1c Tasks 184281, 184799, 184800, 184801 and 184802
Align .editorconfig files

Move Controller logic to DMO classes

GlobalVars.AppSettings = Models.AppSettings.GetFromConfigurationManager();

Question EditorConfig
Project level editorconfig
Format White Spaces
AppSetting when EnvironmentVariable not set
Corrective Actions Tests
Schedule Actions Tests
DMO Tests
Controller Tests

Get ready to use VSCode IDE
2024-12-04 11:58:13 -07:00

59 lines
1.9 KiB
C#

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Fab2ApprovalSystem.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Fab2ApprovalSystem.DMO;
public partial class Training
{
public int TrainingID { get; set; }
public int ECN { get; set; }
public Nullable<System.DateTime> StartedDate { get; set; }
public Nullable<System.DateTime> CompletedDate { get; set; }
public Nullable<bool> Status { get; set; }
public Nullable<bool> Deleted { get; set; }
public Nullable<System.DateTime> DeletedDate { get; set; }
[NotMapped]
public string Title
{
get
{
ECN_DMO ecnDMO = new ECN_DMO();
string ECNTitle = ecnDMO.GetECN(ECN).Title;
return ECNTitle;
}
}
[NotMapped]
public string ECNTrainingGroups
{
get
{
ECN_DMO ecnDMO = new ECN_DMO();
TrainingDMO trainingDMO = new TrainingDMO();
ECN ecn = ecnDMO.GetECN(ECN);
List<int> trainingGroupIDs = trainingDMO.GetECNAssignedTrainingGroups(ECN);
string groupNames = "";
foreach (int groupId in trainingGroupIDs)
{
string groupName = trainingDMO.GetTrainingGroupByID(groupId).TrainingGroupName;
groupNames += groupName + ",";
}
return groupNames;
}
}
}
}