Example #1
0
 private void ChangeContents_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         S3604App.GiOptContentsInfo = (int)S3604Consts.OPT_Change;
         if (_mContentsNodeTemp.LongParentNodeId == 0)
         {
             return;
         }
         List <ContentsTree> lstContentsTreeChild = GetAllChildInfo(_mContentsNodeTemp);
         if (lstContentsTreeChild == null)
         {
             return;
         }
         _mContentsNodeTemp.LstChildInfos = lstContentsTreeChild;
         List <ContentsTree> lstContentsTreeNode = GetAllNodeInfo(_mContentsNodeTemp);
         if (lstContentsTreeNode == null)
         {
             return;
         }
         _mContentsNodeTemp.LstNodeInfos = lstContentsTreeNode;
         S3604App.GContentsTree          = _mContentsNodeTemp;
         S3604App.GQueryModify           = false;
         ContentsProperties newPage = new ContentsProperties();
         newPage.ParentPage     = this;
         newPage.CurrentApp     = CurrentApp;
         PopupPanelInfo.Content = newPage;
         PopupPanelInfo.Title   = CurrentApp.GetLanguageInfo("3604T00010", "Change Contents");
         PopupPanelInfo.IsOpen  = true;
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
Example #2
0
        private void CreateContents_Click(object sender, RoutedEventArgs e)
        {
            var btn = e.Source as Button;

            if (btn != null)
            {
                try
                {
                    ContentsTree nodeInfo = ContentsCheckableTree.SelectedItem as ContentsTree;
                    if (nodeInfo == null)
                    {
                        return;
                    }

                    _mContentsNodeTemp         = nodeInfo;
                    S3604App.GiOptContentsInfo = (int)S3604Consts.OPT_Add;
                    List <ContentsTree> lstCategoryTreeChild = GetAllChildInfo(_mContentsNodeTemp);
                    if (lstCategoryTreeChild == null)
                    {
                        return;
                    }
                    _mContentsNodeTemp.LstChildInfos = lstCategoryTreeChild;
                    S3604App.GContentsTree           = _mContentsNodeTemp;
                    S3604App.GQueryModify            = false;
                    ContentsProperties newPage = new ContentsProperties
                    {
                        ParentPage = this,
                        CurrentApp = CurrentApp
                    };
                    PopupPanelInfo.Content = newPage;
                    PopupPanelInfo.Title   = CurrentApp.GetLanguageInfo("3604T00003", "Create Contents");
                    PopupPanelInfo.IsOpen  = true;
                }
                catch (Exception ex)
                {
                    ShowException(ex.Message);
                }
            }
        }