Exemplo n.º 1
0
        private void menu_ShortCutClick(object sender, OnShortCutClickEventArgs e)
        {
            //礼品特殊处理
            ModuleInfo info = e.Result.Content;

            if (info.ModuleCode == "GiftApplyMaster" || info.ModuleCode == "GiftPlan" || info.ModuleCode == "SumGiftPlan")
            {
                string strUrl = string.Empty;
                try
                {
                    HtmlWindow wd = HtmlPage.Window;
                    strUrl = info.ModuleType.Substring(info.ModuleType.IndexOf("[mvc]")).Replace("[mvc]", "");
                    strUrl = strUrl.Split(',')[0].Replace('.', '/');
                    if (strUrl.IndexOf('?') > -1)
                    {
                        strUrl = strUrl + "&uid=" + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    }
                    else
                    {
                        strUrl = strUrl + "?uid=" + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    }
                    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, info.ModuleCode, 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("模块链接异常:" + info.ModuleType);
                }
            }
            else
            {
                _fromMenu = true;
                if (_mainMenu != null)
                {
                    _mainMenu.Start();
                }

                dragShortCut.Visibility = System.Windows.Visibility.Collapsed;
                MainPage.isDrag         = false;


                //1. 检测菜单权限
                CheckPermission(e.Result.Content);
            }
        }
Exemplo n.º 2
0
        private void menu_ShortCutClick(object sender, OnShortCutClickEventArgs e)
        {
            //礼品特殊处理
            V_UserMenuPermission currentMenu = e.Result;

            if (currentMenu.URLADDRESS.ToUpper().Contains("MVC"))
            {
                string strUrl = string.Empty;
                try
                {
                    #region 打开外部Url链接
                    HtmlWindow wd = HtmlPage.Window;
                    strUrl = currentMenu.URLADDRESS.Substring(currentMenu.URLADDRESS.IndexOf("[mvc]")).Replace("[mvc]", "");
                    strUrl = strUrl.Split(',')[0].Replace('.', '/');
                    if (strUrl.IndexOf('?') > -1)
                    {
                        strUrl = strUrl + "&uid=" + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    }
                    else
                    {
                        strUrl = strUrl + "?uid=" + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    }
                    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, info.ModuleCode, 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");
                    #endregion
                }
                catch
                {
                    MessageBox.Show("模块链接异常:" + currentMenu.MENUNAME);
                }
            }
            else
            {
                _fromMenu = true;
                if (MenuPanel != null)
                {
                    MenuPanel.showLoading();
                }

                dragShortCut.Visibility = System.Windows.Visibility.Collapsed;
                MainPage.isDrag         = false;
                //1. 检测菜单权限
                // CheckPermission(e.Result);
                _currentClickModule = currentMenu;
                //1. 获取用户菜单权限
                UserPermissionHelper.OnGetUserMenuPermissionCompleted += new EventHandler((obj, arg) => {
                    OpenMenuContent(currentMenu);
                });
                UserPermissionHelper.GetUserMenuPermission(_currentClickModule);
            }
        }
Exemplo n.º 3
0
        private void menu_ShortCutClick(object sender, OnShortCutClickEventArgs e)
        {
            //礼品特殊处理
            ModuleInfo info = e.Result;
            if (info.ModuleCode == "GiftApplyMaster" || info.ModuleCode == "GiftPlan" || info.ModuleCode == "SumGiftPlan")
            {
                string strUrl = string.Empty;
                try
                {
                    HtmlWindow wd = HtmlPage.Window;
                    strUrl = info.ModuleType.Substring(info.ModuleType.IndexOf("[mvc]")).Replace("[mvc]", "");
                    strUrl = strUrl.Split(',')[0].Replace('.', '/');
                    if (strUrl.IndexOf('?') > -1)
                    {
                        strUrl = strUrl + "&uid=" + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    }
                    else
                    {
                        strUrl = strUrl + "?uid=" + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    }
                    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, info.ModuleCode, 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("模块链接异常:" + info.ModuleType);
                }
            }
            else
            {
                _fromMenu = true;
                if (_mainMenu != null)
                {
                    _mainMenu.showLoading();
                }

                MVCMainPage.isDrag = false;


                //1. 检测菜单权限
                CheckPermission(e.Result);
            }
        }
Exemplo n.º 4
0
        private void menu_ShortCutClick(object sender, OnShortCutClickEventArgs e)
        {
            //礼品特殊处理
            V_UserMenuPermission currentMenu = e.Result;
            if (currentMenu.URLADDRESS.ToUpper().Contains("MVC") )
            {
                string strUrl = string.Empty;
                try
                {
                    #region 打开外部Url链接
                    HtmlWindow wd = HtmlPage.Window;
                    strUrl = currentMenu.URLADDRESS.Substring(currentMenu.URLADDRESS.IndexOf("[mvc]")).Replace("[mvc]", "");
                    strUrl = strUrl.Split(',')[0].Replace('.', '/');
                    if (strUrl.IndexOf('?') > -1)
                    {
                        strUrl = strUrl + "&uid=" + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    }
                    else
                    {
                        strUrl = strUrl + "?uid=" + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    }
                    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, info.ModuleCode, 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");
                    #endregion
                }
                catch
                {
                    MessageBox.Show("模块链接异常:" + currentMenu.MENUNAME);
                }
            }
            else
            {
                _fromMenu = true;
                if (MenuPanel != null)
                {
                    MenuPanel.showLoading();
                }

                dragShortCut.Visibility = System.Windows.Visibility.Collapsed;
                MainPage.isDrag = false;
                //1. 检测菜单权限
               // CheckPermission(e.Result);
                _currentClickModule = currentMenu;
                //1. 获取用户菜单权限
                UserPermissionHelper.OnGetUserMenuPermissionCompleted+=new EventHandler((obj, arg) => {
                    OpenMenuContent(currentMenu);
                });
                UserPermissionHelper.GetUserMenuPermission(_currentClickModule);
            }
        }