Exemplo n.º 1
0
 public void Stop()
 {
     if (radtileview != null)
     {
         foreach (var item in radtileview.Children)
         {
             var radItem = item as DragDockPanel;
             if (radItem != null)
             {
                 IWebpart clearup = radItem.Content as IWebpart;
                 if (clearup != null)
                 {
                     clearup.Stop();
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
 public void Stop()
 {
     if (radtileview != null)
     {
         foreach (var item in radtileview.Items)
         {
             var radItem = item as RadTileViewItem;
             if (radItem != null)
             {
                 IWebpart clearup = radItem.Content as IWebpart;
                 if (clearup != null)
                 {
                     clearup.Stop();
                 }
             }
         }
     }
 }
Exemplo n.º 3
0
        public void ShowNewsInfo(string strNewsID)
        {
            NewsMore manager = new NewsMore(strNewsID);

            if (ViewModel.Context.MainPanel != null)
            {
                if (ViewModel.Context.MainPanel.DefaultContent != null)
                {
                    IWebpart webpart = ViewModel.Context.MainPanel.DefaultContent as IWebpart;
                    if (webpart != null)
                    {
                        webpart.Stop();
                    }
                }
                Stop();
                ViewModel.Context.MainPanel.Navigation(manager, "新    闻");


                //Cleanup();
            }
        }
Exemplo n.º 4
0
        public void LoadMyRecordByConfig(string strConfig)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(strConfig))
                {
                    hideLoadingBar();
                    HtmlPage.Window.Invoke("loadCompletedSL", "Invoke");
                    return;
                }

                SMT.SAAS.Platform.WebParts.Views.MVCPendingTaskManager pendingTaskView = new WebParts.Views.MVCPendingTaskManager("", "open");
                pendingTaskView.isMyrecord     = true;
                pendingTaskView.applicationUrl = strConfig;
                if (ViewModel.Context.MainPanel != null)
                {
                    if (ViewModel.Context.MainPanel.DefaultContent != null)
                    {
                        IWebpart webpart = ViewModel.Context.MainPanel.DefaultContent as IWebpart;
                        if (webpart != null)
                        {
                            webpart.Stop();
                        }
                    }
                    ViewModel.Context.MainPanel.Navigation(pendingTaskView, "我的单据");
                }


                // SMT.SAAS.Platform.WebParts.Views.MyRecord myRecordView = new WebParts.Views.MyRecord();
                // myRecordView.ShowMyRecord(strConfig);
            }
            catch (Exception ex)
            {
            }
            finally
            {
                hideLoadingBar();
                HtmlPage.Window.Invoke("loadCompletedSL", "Invoke");
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// 打开我的单据
 /// </summary>
 /// <param name="strConfig"></param>
 private void LoadMyRecord(string strConfig)
 {
     try
     {
         if (string.IsNullOrWhiteSpace(strConfig))
         {
             return;
         }
         SMT.SAAS.Platform.WebParts.Views.MVCPendingTaskManager pendingTaskView = new WebParts.Views.MVCPendingTaskManager("", "open");
         pendingTaskView.isMyrecord     = true;
         pendingTaskView.applicationUrl = strConfig;
         if (ViewModel.Context.MainPanel != null)
         {
             if (ViewModel.Context.MainPanel.DefaultContent != null)
             {
                 IWebpart webpart = ViewModel.Context.MainPanel.DefaultContent as IWebpart;
                 if (webpart != null)
                 {
                     webpart.Stop();
                 }
             }
             ViewModel.Context.MainPanel.Navigation(pendingTaskView, "我的单据");
         }
     }
     catch (Exception ex)
     {
         string message = string.Format("打开模块'{0}'失败,请联系管理员!", ex.ToString());
         AppContext.SystemMessage(message);
         AppContext.ShowSystemMessageText();
     }
     finally
     {
         hideLoadingBar();
         HtmlPage.Window.Invoke("loadCompletedSL", "Invoke");
     }
 }
Exemplo n.º 6
0
        void ayTools_InitAsyncCompleted(object sender, EventArgs e)
        {
            loading.Stop();
            PendingTaskManager manager = new PendingTaskManager(_currentSourceMsgID, _state);

            using (XmlReader reader = XmlReader.Create(new StringReader(_currentXmlObj)))
            {
                XElement xmlClient = XElement.Load(reader);
                var      temp      = from c in xmlClient.DescendantsAndSelf("System")
                                     select c;
                string AssemblyName = temp.Elements("AssemblyName").SingleOrDefault().Value.Trim();
                string strUrl       = temp.Elements("PageParameter").SingleOrDefault().Value.Trim();
                string strOid       = temp.Elements("ApplicationOrder").SingleOrDefault().Value.Trim();
                if (AssemblyName == "GiftApplyMaster" || AssemblyName == "GiftPlan" || AssemblyName == "SumGiftPlan")
                {
                    try
                    {
                        HtmlWindow wd = HtmlPage.Window;
                        if (strUrl.IndexOf('?') > -1)
                        {
                            strUrl = strUrl + "&uid=" + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID + "&oid=" + strOid;
                        }
                        else
                        {
                            strUrl = strUrl + "?uid=" + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID + "&oid=" + strOid;
                        }
                        string strHost = SMT.SAAS.Main.CurrentContext.Common.HostAddress.ToString().Split('/')[0];
                        strUrl = "http://" + strHost + "/" + strUrl;
                        Uri uri = new Uri(strUrl);
                        HtmlPopupWindowOptions options = new HtmlPopupWindowOptions();
                        options.Directories = false;
                        options.Location    = false;
                        options.Menubar     = false;
                        options.Status      = false;
                        options.Toolbar     = false;
                        options.Status      = false;
                        options.Resizeable  = true;
                        options.Left        = 280;
                        options.Top         = 100;
                        options.Width       = 800;
                        options.Height      = 600;
                        // HtmlPage.PopupWindow(uri, AssemblyName, options);
                        string strWindow = System.DateTime.Now.ToString("yyMMddHHmsssfff");
                        wd.Navigate(uri, strWindow, "directories=no,fullscreen=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no");
                    }
                    catch
                    {
                        MessageBox.Show("模块链接异常:" + strUrl);
                    }
                }
                else
                {
                    if (ViewModel.Context.MainPanel != null)
                    {
                        if (ViewModel.Context.MainPanel.DefaultContent != null)
                        {
                            IWebpart webpart = ViewModel.Context.MainPanel.DefaultContent as IWebpart;
                            if (webpart != null)
                            {
                                webpart.Stop();
                            }
                        }
                        Stop();
                        ViewModel.Context.MainPanel.Navigation(manager, "待办任务");
                    }
                }
            }
        }