示例#1
0
        public void OpenZoomEditWindow(string Name,string Id)
        {
            CloseEditZoomWindows(Name);
            if (_editZoomWindows.ContainsKey(Name))
            {
                Edit ewin = _editZoomWindows[Name];
                ewin.OpenZoomEditId(Id);
            }
            else
            {
                // make sure we have the object set up
                string[] sObj = Globals.ThisAddIn.GetSettings().GetSetting("", "SObjects").Split('|');
                if (sObj.Contains(Name))
                {
                    Edit ewin = new Edit("Zoom", Name, Id);
                    _editZoomWindows.Add(Name, ewin);

                }
                else
                {
                    // open as a webpage
                    // need to get the url
                    string url = _d.GetUrlForNonLoaded(Name);
                    Uri temp = new Uri(url.Replace("{ID}", Id));
                    string rooturl = temp.Scheme + "://" + temp.Host;

                    string frontdoor = rooturl + "/secur/frontdoor.jsp?sid=" + _d.GetSessionId();
                    string redirect = frontdoor + "&retURL=" + temp.PathAndQuery;

                    System.Diagnostics.Process.Start(redirect);
                }
            }
        }
示例#2
0
 public void OpenEditWindow(string Name)
 {
     CloseEditWindows();
     if (_editWindows.ContainsKey(Name))
     {
         Edit ewin = _editWindows[Name];
         ewin.Show();
         ewin.Focus();
     }
     else
     {
         Edit ewin = new Edit(Name);
         _editWindows.Add(Name, ewin);
         ewin.Show();
         ewin.Focus();
     }
 }