public static void UpdateCurrentEntity(ref Entities targetEntity) { CurrentEntity = targetEntity; CurrentEntityID = CurrentEntity.ID; CurrentEntityName = CurrentEntity.EntityName; PageFunctions.UpdateDetailsBlock(); }
public static void UpdateMyDefaultEntity(ref Entities targetEntity) { Entities defaultEntity = targetEntity; MyDefaultEntityID = targetEntity.ID; MyDefaultEntityName = targetEntity.EntityName; PageFunctions.UpdateDetailsBlock(); }
public static void ChangeDefaultEntity(ref Entities selectedEntity, string displayName) { if (selectedEntity != null) { try { SetDefaultEntity(ref selectedEntity); string notCurrent = ""; if (displayName != CurrentEntityName) { notCurrent = " Note that you are still currently connected to '" + CurrentEntityName + "'."; } MessageFunctions.SuccessAlert("Your default Entity has now been set to '" + displayName + "'." + notCurrent, "Default Entity Changed"); PageFunctions.UpdateDetailsBlock(); PageFunctions.ShowTilesPage(); } catch (Exception generalException) { MessageFunctions.Error("Error changing entity", generalException); } } else { MessageFunctions.InvalidMessage("Please select an Entity from the drop-down list.", "No Entity Selected"); } }