Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gordon360/Authorization/StateYourBusiness.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class StateYourBusiness : ActionFilterAttribute

// User position at the college and their id.
private IEnumerable<AuthGroup> user_groups { get; set; }
private string user_id { get; set; }
private int user_id { get; set; }
private string user_name { get; set; }

public async override Task OnActionExecutionAsync(ActionExecutingContext actionContext, ActionExecutionDelegate next)
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Controllers/CliftonStrengthsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ActionResult<IEnumerable<CliftonStrengthsUploadResultViewModel>> Post([Fr
UploadResult = "Not Found"
};
}
int gordonID = int.Parse(account.GordonID);
int gordonID = account.GordonID;
string rowState;

Clifton_Strengths? existing = _context.Clifton_Strengths.FirstOrDefault(x => x.ID_NUM == gordonID);
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Controllers/DiningController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async Task<ActionResult<string>> GetAsync()
{
var sessionCode = Helpers.GetCurrentSession(_context);
var authenticatedUsername = AuthUtils.GetUsername(User);
var authenticatedUserId = int.Parse(_accountService.GetAccountByUsername(authenticatedUsername).GordonID);
var authenticatedUserId = _accountService.GetAccountByUsername(authenticatedUsername).GordonID;
var diningInfo = _diningService.GetDiningPlanInfo(authenticatedUserId, sessionCode);

if (diningInfo == null)
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Controllers/JobsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private int GetCurrentUserID()
{
var username = AuthUtils.GetUsername(User);
var account = _accountService.GetAccountByUsername(username);
return int.Parse(account.GordonID);
return account.GordonID;
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions Gordon360/Controllers/ProfilesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public async Task<ActionResult<IEnumerable<AdvisorViewModel>>> GetAdvisorsAsync(
public ActionResult<string[]> GetCliftonStrengths_DEPRECATED(string username)
{
var id = _accountService.GetAccountByUsername(username).GordonID;
var strengths = _profileService.GetCliftonStrengths(int.Parse(id));
var strengths = _profileService.GetCliftonStrengths(id);
if (strengths is null)
{
return Ok(Array.Empty<string>());
Expand All @@ -151,7 +151,7 @@ public ActionResult<string[]> GetCliftonStrengths_DEPRECATED(string username)
public ActionResult<CliftonStrengthsViewModel?> GetCliftonStrengths(string username)
{
var id = _accountService.GetAccountByUsername(username).GordonID;
var strengths = _profileService.GetCliftonStrengths(int.Parse(id));
var strengths = _profileService.GetCliftonStrengths(id);
if (strengths is null)
{
return Ok(null);
Expand All @@ -171,7 +171,7 @@ public async Task<ActionResult<bool>> ToggleCliftonStrengthsPrivacyAsync()
{
var username = AuthUtils.GetUsername(User);
var id = _accountService.GetAccountByUsername(username).GordonID;
var privacy = await _profileService.ToggleCliftonStrengthsPrivacyAsync(int.Parse(id));
var privacy = await _profileService.ToggleCliftonStrengthsPrivacyAsync(id);

return Ok(privacy);
}
Expand Down
20 changes: 10 additions & 10 deletions Gordon360/Models/CCT/Context/CCTContextProcedures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ public virtual async Task<List<FINALIZATION_GET_FINALIZATION_STATUSResult>> FINA
return _;
}

public virtual async Task<List<FINALIZATION_GETDEMOGRAPHICResult>> FINALIZATION_GETDEMOGRAPHICAsync(string UserID, string FeatureID, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default)
public virtual async Task<List<FINALIZATION_GETDEMOGRAPHICResult>> FINALIZATION_GETDEMOGRAPHICAsync(int UserID, string FeatureID, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default)
{
var parameterreturnValue = new SqlParameter
{
Expand All @@ -1198,7 +1198,7 @@ public virtual async Task<List<FINALIZATION_GETDEMOGRAPHICResult>> FINALIZATION_
{
ParameterName = "UserID",
Size = 9,
Value = UserID ?? Convert.DBNull,
Value = UserID,
SqlDbType = System.Data.SqlDbType.VarChar,
},
new SqlParameter
Expand Down Expand Up @@ -1243,7 +1243,7 @@ public virtual async Task<List<FINALIZATION_GETHOLDSBYIDResult>> FINALIZATION_GE
return _;
}

public virtual async Task<List<FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult>> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(string UserID, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default)
public virtual async Task<List<FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult>> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(int UserID, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default)
{
var parameterreturnValue = new SqlParameter
{
Expand All @@ -1258,7 +1258,7 @@ public virtual async Task<List<FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult>>
{
ParameterName = "UserID",
Size = 9,
Value = UserID ?? Convert.DBNull,
Value = UserID,
SqlDbType = System.Data.SqlDbType.VarChar,
},
parameterreturnValue,
Expand All @@ -1270,7 +1270,7 @@ public virtual async Task<List<FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult>>
return _;
}

public virtual async Task<List<FINALIZATION_UPDATECELLPHONEResult>> FINALIZATION_UPDATECELLPHONEAsync(string UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default)
public virtual async Task<List<FINALIZATION_UPDATECELLPHONEResult>> FINALIZATION_UPDATECELLPHONEAsync(int UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default)
{
var parameterreturnValue = new SqlParameter
{
Expand All @@ -1285,7 +1285,7 @@ public virtual async Task<List<FINALIZATION_UPDATECELLPHONEResult>> FINALIZATION
{
ParameterName = "UserID",
Size = 9,
Value = UserID ?? Convert.DBNull,
Value = UserID,
SqlDbType = System.Data.SqlDbType.VarChar,
},
new SqlParameter
Expand Down Expand Up @@ -1316,7 +1316,7 @@ public virtual async Task<List<FINALIZATION_UPDATECELLPHONEResult>> FINALIZATION
return _;
}

public virtual async Task<List<FINALIZATION_UPDATEDEMOGRAPHICResult>> FINALIZATION_UPDATEDEMOGRAPHICAsync(string UserID, string RaceValue, int? EthnicityValue, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default)
public virtual async Task<List<FINALIZATION_UPDATEDEMOGRAPHICResult>> FINALIZATION_UPDATEDEMOGRAPHICAsync(int UserID, string RaceValue, int? EthnicityValue, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default)
{
var parameterreturnValue = new SqlParameter
{
Expand All @@ -1331,7 +1331,7 @@ public virtual async Task<List<FINALIZATION_UPDATEDEMOGRAPHICResult>> FINALIZATI
{
ParameterName = "UserID",
Size = 9,
Value = UserID ?? Convert.DBNull,
Value = UserID,
SqlDbType = System.Data.SqlDbType.VarChar,
},
new SqlParameter
Expand Down Expand Up @@ -3131,7 +3131,7 @@ public virtual async Task<int> UPDATE_ACT_INFOAsync(OutputParameter<int> returnV
return _;
}

public virtual async Task<List<UPDATE_CELL_PHONEResult>> UPDATE_CELL_PHONEAsync(string UserID, string PhoneUnformatted, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default)
public virtual async Task<List<UPDATE_CELL_PHONEResult>> UPDATE_CELL_PHONEAsync(int UserID, string PhoneUnformatted, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default)
{
var parameterreturnValue = new SqlParameter
{
Expand All @@ -3146,7 +3146,7 @@ public virtual async Task<List<UPDATE_CELL_PHONEResult>> UPDATE_CELL_PHONEAsync(
{
ParameterName = "UserID",
Size = 9,
Value = UserID ?? Convert.DBNull,
Value = UserID,
SqlDbType = System.Data.SqlDbType.VarChar,
},
new SqlParameter
Expand Down
10 changes: 5 additions & 5 deletions Gordon360/Models/CCT/Context/ICCTContextProcedures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public partial interface ICCTContextProcedures
Task<List<DISTINCT_ACT_TYPEResult>> DISTINCT_ACT_TYPEAsync(string SESS_CDE, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<EMAILS_PER_ACT_CDEResult>> EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<FINALIZATION_GET_FINALIZATION_STATUSResult>> FINALIZATION_GET_FINALIZATION_STATUSAsync(int? UserID, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<FINALIZATION_GETDEMOGRAPHICResult>> FINALIZATION_GETDEMOGRAPHICAsync(string UserID, string FeatureID, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<FINALIZATION_GETDEMOGRAPHICResult>> FINALIZATION_GETDEMOGRAPHICAsync(int UserID, string FeatureID, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<FINALIZATION_GETHOLDSBYIDResult>> FINALIZATION_GETHOLDSBYIDAsync(int? ID_NUM, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult>> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(string UserID, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<FINALIZATION_UPDATECELLPHONEResult>> FINALIZATION_UPDATECELLPHONEAsync(string UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<FINALIZATION_UPDATEDEMOGRAPHICResult>> FINALIZATION_UPDATEDEMOGRAPHICAsync(string UserID, string RaceValue, int? EthnicityValue, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult>> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(int UserID, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<FINALIZATION_UPDATECELLPHONEResult>> FINALIZATION_UPDATECELLPHONEAsync(int UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<FINALIZATION_UPDATEDEMOGRAPHICResult>> FINALIZATION_UPDATEDEMOGRAPHICAsync(int UserID, string RaceValue, int? EthnicityValue, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<GET_AA_APARTMENT_CHOICES_BY_APP_IDResult>> GET_AA_APARTMENT_CHOICES_BY_APP_IDAsync(int? APPLICATION_ID, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<GET_AA_APARTMENT_HALLSResult>> GET_AA_APARTMENT_HALLSAsync(OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<GET_AA_APPID_BY_NAME_AND_DATEResult>> GET_AA_APPID_BY_NAME_AND_DATEAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Expand Down Expand Up @@ -107,7 +107,7 @@ public partial interface ICCTContextProcedures
Task<int> UPDATE_AA_APPLICATION_DATESUBMITTEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<int> UPDATE_AA_APPLICATION_EDITORAsync(int? APPLICATION_ID, string EDITOR_USERNAME, DateTime? NOW, string NEW_EDITOR_USERNAME, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<int> UPDATE_ACT_INFOAsync(OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<UPDATE_CELL_PHONEResult>> UPDATE_CELL_PHONEAsync(string UserID, string PhoneUnformatted, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<List<UPDATE_CELL_PHONEResult>> UPDATE_CELL_PHONEAsync(int UserID, string PhoneUnformatted, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<int> UPDATE_DESCRIPTIONAsync(int? ID, string VALUE, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<int> UPDATE_EMRGCONTACTAsync(int? StudentID, int? ContactNum, string ContactLastName, string ContactFirstName, string ContactHomePhone, string ContactMobilePhone, string ContactRelationship, string Notes, string Username, string JobName, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Task<int> Update_Health_Status_Upon_Form_CompletionAsync(string ResponderEmail, OutputParameter<int> returnValue = null, CancellationToken cancellationToken = default);
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/ACCOUNT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public partial class ACCOUNT
[Required]
[StringLength(10)]
[Unicode(false)]
public string gordon_id { get; set; }
public int gordon_id { get; set; }
[StringLength(14)]
[Unicode(false)]
public string barcode { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions Gordon360/Models/CCT/dbo/ADVISOR_SEPARATEResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace Gordon360.Models.CCT
{
public partial class ADVISOR_SEPARATEResult
{
public string Advisor1 { get; set; }
public string Advisor2 { get; set; }
public string Advisor3 { get; set; }
public int Advisor1 { get; set; }
public int Advisor2 { get; set; }
public int Advisor3 { get; set; }
}
}
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/AccountPhotoURL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public partial class AccountPhotoURL
{
[StringLength(10)]
[Unicode(false)]
public string Gordonid { get; set; }
public int Gordonid { get; set; }
[StringLength(86)]
[Unicode(false)]
public string PhotoURL { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/Alumni.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public partial class Alumni
[Required]
[StringLength(25)]
[Unicode(false)]
public string ID { get; set; }
public int ID { get; set; }
[StringLength(25)]
[Unicode(false)]
public string WebUpdate { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Gordon360.Models.CCT
{
public partial class FINALIZATION_GET_FINALIZATION_STATUSResult
{
public string UserID { get; set; }
public int UserID { get; set; }
public string Period { get; set; }
public bool FinalizationCompleted { get; set; }
public string RootQuery { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Gordon360.Models.CCT
{
public partial class FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult
{
public string UserID { get; set; }
public int UserID { get; set; }
public string Period { get; set; }
public bool FinalizationCompleted { get; set; }
public string RootQuery { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/FacStaff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public partial class FacStaff
[Required]
[StringLength(10)]
[Unicode(false)]
public string ID { get; set; }
public int ID { get; set; }
[StringLength(5)]
[Unicode(false)]
public string Title { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/Information_Change_Request.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public partial class Information_Change_Request
[Required]
[StringLength(16)]
[Unicode(false)]
public string ID_Num { get; set; }
public int ID_Num { get; set; }
[Required]
[StringLength(20)]
[Unicode(false)]
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/MYSCHEDULE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class MYSCHEDULE
[Key]
[StringLength(10)]
[Unicode(false)]
public string GORDON_ID { get; set; }
public int GORDON_ID { get; set; }
[StringLength(50)]
[Unicode(false)]
public string LOCATION { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/MYSCHEDULE_BY_IDResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Gordon360.Models.CCT
public partial class MYSCHEDULE_BY_IDResult
{
public string EVENT_ID { get; set; }
public string GORDON_ID { get; set; }
public int GORDON_ID { get; set; }
public string LOCATION { get; set; }
public string DESCRIPTION { get; set; }
public string MON_CDE { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/Schedule_Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public partial class Schedule_Control
[Key]
[StringLength(10)]
[Unicode(false)]
public string gordon_id { get; set; }
public int gordon_id { get; set; }
}
}
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/Student.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public partial class Student
[Required]
[StringLength(10)]
[Unicode(false)]
public string ID { get; set; }
public int ID { get; set; }
[StringLength(3)]
[Unicode(false)]
public string Title { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/User_Connection_Ids.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public partial class User_Connection_Ids
[Required]
[StringLength(72)]
[Unicode(false)]
public string user_id { get; set; }
public int user_id { get; set; }
[Required]
[StringLength(72)]
[Unicode(false)]
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/User_Rooms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public partial class User_Rooms
[Required]
[StringLength(72)]
[Unicode(false)]
public string user_id { get; set; }
public int user_id { get; set; }
[Required]
[StringLength(72)]
[Unicode(false)]
Expand Down
2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/dbo/Users.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public partial class Users
[Required]
[StringLength(72)]
[Unicode(false)]
public string _id { get; set; }
public int _id { get; set; }
[Required]
[StringLength(72)]
[Unicode(false)]
Expand Down
4 changes: 2 additions & 2 deletions Gordon360/Models/ViewModels/AccountViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Gordon360.Models.ViewModels
{
public class AccountViewModel
{
public string GordonID { get; set; }
public int GordonID { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
Expand All @@ -19,7 +19,7 @@ public static implicit operator AccountViewModel(ACCOUNT a)
{
AccountViewModel vm = new AccountViewModel
{
GordonID = a.gordon_id.Trim(),
GordonID = a.gordon_id,
FirstName = a.firstname.Trim(),
LastName = a.lastname.Trim(),
Email = a.email ?? "", // Some random records have null for an email.
Expand Down
4 changes: 2 additions & 2 deletions Gordon360/Models/ViewModels/AlumniProfileViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Gordon360.Models.ViewModels
{
public record AlumniProfileViewModel
(
string ID,
int ID,
string WebUpdate,
string Title,
string FirstName,
Expand Down Expand Up @@ -53,7 +53,7 @@ public record AlumniProfileViewModel

return new AlumniProfileViewModel
(
alu.ID.Trim(),
alu.ID,
alu.WebUpdate ?? "",
alu.Title ?? "",
alu.FirstName ?? "",
Expand Down
4 changes: 2 additions & 2 deletions Gordon360/Models/ViewModels/FacultyStaffProfileViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Gordon360.Models.ViewModels
{
public record FacultyStaffProfileViewModel
(
string ID,
int ID,
string Title,
string FirstName,
string MiddleName,
Expand Down Expand Up @@ -51,7 +51,7 @@ public record FacultyStaffProfileViewModel
}

return new FacultyStaffProfileViewModel(
fac.ID.Trim(),
fac.ID,
fac.Title ?? "",
fac.FirstName ?? "",
fac.MiddleName ?? "",
Expand Down
Loading