基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
using Lskj.Business;
|
||||
using Lskj.Business.Impl;
|
||||
using Lskj.Control;
|
||||
using Lskj.IPersonnelConnection;
|
||||
using Lskj.Model;
|
||||
using Lskj.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Lskj.pubDwg
|
||||
{
|
||||
public partial class FrmMain : Form
|
||||
{
|
||||
public DynamicPubBrowerModel PubBrowerModel;
|
||||
public static bool isBatchBrower = false;
|
||||
|
||||
public FrmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载时
|
||||
/// </summary>
|
||||
public void OnLoad()
|
||||
{
|
||||
try
|
||||
{
|
||||
DataRow menuCondRow = BaseImpl.GetPopMenu(this.PubBrowerModel.ModuleCode, this.PubBrowerModel.FormText); //获取菜单其他配置
|
||||
isBatchBrower = menuCondRow != null ? menuCondRow["dllname"].Equals("Lskj.PubBatchBrower.dll") ? true : false : false;
|
||||
if (PubBrowerModel.isCalSize)
|
||||
{
|
||||
this.Height = Convert.ToInt32(Lskj.Main.Model.Manager.frmHeight * PubBrowerModel.PerHeight);
|
||||
this.Width = Convert.ToInt32(Screen.PrimaryScreen.WorkingArea.Width * PubBrowerModel.PerWidth);
|
||||
this.Location = new Point((Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2,
|
||||
(Lskj.Main.Model.Manager.frmHeight - this.Height) / 2);
|
||||
}
|
||||
bool isPostFlag = this.PubBrowerModel.isPostFlag == 1;
|
||||
this.PubBrowerModel.Privilege = PubBrowerModel.ModuleId > 0 ? BaseImpl.GetUserPurviewsByMenuId(PubBrowerModel.ModuleId + "") + "" : BaseImpl.GetUserPurviewsByMenuCode(PubBrowerModel.ModuleCode) + "";
|
||||
string urlEnd = string.Empty;
|
||||
if (isPostFlag)
|
||||
{
|
||||
urlEnd = string.IsNullOrEmpty(PubBrowerModel.UrlParame) ? "" : HttpUtility.UrlEncode(PubBrowerModel.UrlParame);
|
||||
}
|
||||
else
|
||||
{
|
||||
urlEnd = string.IsNullOrEmpty(PubBrowerModel.UrlParame) ? ReplaceHelper.ReplaceUserInfo(PubBrowerModel.ModuleCode) : string.IsNullOrWhiteSpace(PubBrowerModel.UrlParame) ? "" : HttpUtility.UrlEncode(PubBrowerModel.UrlParame);
|
||||
}
|
||||
string OAUrlAndEnd = string.Empty;
|
||||
if (!(PubBrowerModel.BetweenDLLCoid != null && PubBrowerModel.BetweenDLLCoid.StartsWith("http")) && !urlEnd.StartsWith("http"))
|
||||
{
|
||||
string OAUrl = !string.IsNullOrEmpty(SystemInfo.Instance.OAUrl) && SystemInfo.Instance.OAUrl.EndsWith("/") ? SystemInfo.Instance.OAUrl : SystemInfo.Instance.OAUrl + "/";
|
||||
string Between = !string.IsNullOrEmpty(PubBrowerModel.BetweenDLLCoid) && PubBrowerModel.BetweenDLLCoid.StartsWith("/") ? PubBrowerModel.BetweenDLLCoid.TrimStart('/') : PubBrowerModel.BetweenDLLCoid;
|
||||
OAUrlAndEnd = OAUrl + Between + urlEnd;
|
||||
}
|
||||
string url = PubBrowerModel.BetweenDLLCoid != null && PubBrowerModel.BetweenDLLCoid.StartsWith("http") ? PubBrowerModel.BetweenDLLCoid + urlEnd : urlEnd.StartsWith("http") ? PubBrowerModel.BetweenDLLCoid + urlEnd : OAUrlAndEnd;
|
||||
|
||||
if (url.Contains("{iPersonnelAllowInformation}") || url.Contains("{iPersonnelEncryptedMessage}"))
|
||||
{
|
||||
//url = ReplaceHelper.ReplaceIPersonnel(url, SystemInfo.Instance.iPersonnelAllowInformation, SystemInfo.Instance.iPersonnelCustomerId, SystemInfo.Instance.iPersonnelPrivateKey);
|
||||
url = PersonnelReplaceHelper.UrlEncryption(url, SystemInfo.Instance.iPersonnelAllowInformation, SystemInfo.Instance.iPersonnelCustomerId, SystemInfo.Instance.iPersonnelPrivateKey, ERPInfo.Instance.UserLinkPhone);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
axMxDrawX1.GotoURL(url);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Instance.WriteError(ex, "浏览器dll");
|
||||
//MessageUtil.Show(ex.Message + "\r\n" + ex.StackTrace);
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user