private void SessionViewDetail_Loaded(object sender, RoutedEventArgs e)
 {
     if(FormMode != FormModes.New)
     {
         SessionEntity = SessionRepo.FindByID(_sessionID);
     }
 }
        private void OpenWindowSession(string mode, string title)
        {
            var win = getSelectedValue();

            if (win == null && mode != FormModes.New)
            {
                Message(MessageTypes.Error, "Please Select to " + mode + " Staff Detail");
                return;
            }

            if (mode == FormModes.New)
            {
                win = new Session();
            }
            var view = new ucSessionView(mode, win.SessionID);
            view.ParentContainer = this;
            OpenPopUp(view, title, 500, 300);
        }
        public void AddToList(Session ss)
        {
            AllSessions = AllSessions.Add(ss);

        }