コード例 #1
0
 public static void UpdateCurrentEntity(ref Entities targetEntity)
 {
     CurrentEntity     = targetEntity;
     CurrentEntityID   = CurrentEntity.ID;
     CurrentEntityName = CurrentEntity.EntityName;
     PageFunctions.UpdateDetailsBlock();
 }
コード例 #2
0
        public static void UpdateMyDefaultEntity(ref Entities targetEntity)
        {
            Entities defaultEntity = targetEntity;

            MyDefaultEntityID   = targetEntity.ID;
            MyDefaultEntityName = targetEntity.EntityName;
            PageFunctions.UpdateDetailsBlock();
        }
コード例 #3
0
        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");
            }
        }