1019-003-gaofei
This commit is contained in:
parent
fbe44ac308
commit
b6e254bfca
|
@ -4,3 +4,4 @@
|
|||
|
||||
/SGGLPackFile/PackFile/bin
|
||||
/SGGLPackFile
|
||||
/SGGL/FineUIPro.Web/File/Excel/Temp
|
||||
|
|
|
@ -145,5 +145,73 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 不做catch处理,需要在外部做
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="method">默认GET,空则补充为GET</param>
|
||||
/// <param name="contenttype">默认json,空则补充为json</param>
|
||||
/// <param name="header">请求头部</param>
|
||||
/// <param name="data">请求body内容</param>
|
||||
/// <returns></returns>
|
||||
public static string ControlHttp(string url, string method = "GET", string contenttype = "application/json;charset=utf-8", Hashtable header = null, string data = null)
|
||||
{
|
||||
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
request.Method = string.IsNullOrEmpty(method) ? "GET" : method;
|
||||
request.ContentType = string.IsNullOrEmpty(contenttype) ? "application/json;charset=utf-8" : contenttype;
|
||||
if (header != null)
|
||||
{
|
||||
foreach (var i in header.Keys)
|
||||
{
|
||||
request.Headers.Add(i.ToString(), header[i].ToString());
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(data))
|
||||
{
|
||||
Stream RequestStream = request.GetRequestStream();
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(data);
|
||||
RequestStream.Write(bytes, 0, bytes.Length);
|
||||
RequestStream.Close();
|
||||
}
|
||||
|
||||
HttpWebResponse response = null;
|
||||
Stream ResponseStream = null;
|
||||
StreamReader StreamReader = null;
|
||||
try
|
||||
{
|
||||
response = (HttpWebResponse)request.GetResponse();
|
||||
ResponseStream = response.GetResponseStream();
|
||||
StreamReader = new StreamReader(ResponseStream, Encoding.GetEncoding("utf-8"));
|
||||
|
||||
string re = StreamReader.ReadToEnd();
|
||||
return re;
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
response = (HttpWebResponse)ex.Response;
|
||||
ResponseStream = response.GetResponseStream();
|
||||
StreamReader = new StreamReader(ResponseStream, Encoding.GetEncoding("utf-8"));
|
||||
|
||||
string re = StreamReader.ReadToEnd();
|
||||
return re;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (StreamReader != null)
|
||||
{
|
||||
StreamReader.Close();
|
||||
}
|
||||
if (ResponseStream != null)
|
||||
{
|
||||
ResponseStream.Close();
|
||||
}
|
||||
if (response != null)
|
||||
{
|
||||
response.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,6 +103,14 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 费控软件地址
|
||||
/// </summary>
|
||||
public static string ControlApiUrl
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 软件版本
|
||||
/// </summary>
|
||||
public static string SystemVersion
|
||||
|
|
|
@ -17,3 +17,72 @@ IP地址:::1
|
|||
|
||||
出错时间:09/29/2021 15:32:37
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:ProtocolViolationException
|
||||
错误信息:无法发送具有此谓词类型的内容正文。
|
||||
错误堆栈:
|
||||
在 System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
|
||||
在 System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
|
||||
在 System.Net.HttpWebRequest.GetRequestStream()
|
||||
在 BLL.APIGetHttpService.OutsideHttp(String url, String method, String contenttype, Hashtable header, String data) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\API\APIGetHttpService.cs:行号 105
|
||||
在 FineUIPro.Web.ProjectData.Installation.btnMenuDown_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\Installation.aspx.cs:行号 251
|
||||
在 FineUIPro.MenuButton.OnClick(EventArgs e)
|
||||
在 (MenuButton , EventArgs )
|
||||
在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:10/19/2021 16:10:16
|
||||
出错文件:http://localhost:8118/ProjectData/Installation.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:10/19/2021 16:10:16
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:ProtocolViolationException
|
||||
错误信息:无法发送具有此谓词类型的内容正文。
|
||||
错误堆栈:
|
||||
在 System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
|
||||
在 System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
|
||||
在 System.Net.HttpWebRequest.GetRequestStream()
|
||||
在 BLL.APIGetHttpService.OutsideHttp(String url, String method, String contenttype, Hashtable header, String data) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\API\APIGetHttpService.cs:行号 105
|
||||
在 FineUIPro.Web.ProjectData.Installation.btnMenuDown_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\Installation.aspx.cs:行号 251
|
||||
在 FineUIPro.MenuButton.OnClick(EventArgs e)
|
||||
在 (MenuButton , EventArgs )
|
||||
在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:10/19/2021 16:10:56
|
||||
出错文件:http://localhost:8118/ProjectData/Installation.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:10/19/2021 16:10:56
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:ProtocolViolationException
|
||||
错误信息:无法发送具有此谓词类型的内容正文。
|
||||
错误堆栈:
|
||||
在 System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
|
||||
在 System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
|
||||
在 System.Net.HttpWebRequest.GetRequestStream()
|
||||
在 BLL.APIGetHttpService.OutsideHttp(String url, String method, String contenttype, Hashtable header, String data) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\API\APIGetHttpService.cs:行号 105
|
||||
在 FineUIPro.Web.ProjectData.Installation.btnMenuDown_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\Installation.aspx.cs:行号 251
|
||||
在 FineUIPro.MenuButton.OnClick(EventArgs e)
|
||||
在 (MenuButton , EventArgs )
|
||||
在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:10/19/2021 16:11:45
|
||||
出错文件:http://localhost:8118/ProjectData/Installation.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:10/19/2021 16:11:45
|
||||
|
||||
|
|
|
@ -20,13 +20,14 @@
|
|||
try
|
||||
{
|
||||
Funs.RootPath = Server.MapPath("~/");
|
||||
|
||||
|
||||
// 日志文件所在目录
|
||||
ErrLogInfo.DefaultErrLogFullPath = Server.MapPath("~/ErrLog.txt");
|
||||
Funs.ConnString = ConfigurationManager.AppSettings["ConnectionString"];
|
||||
Funs.SystemName = ConfigurationManager.AppSettings["SystemName"];
|
||||
Funs.SGGLUrl = ConfigurationManager.AppSettings["SGGLUrl"];
|
||||
Funs.RealNameApiUrl = ConfigurationManager.AppSettings["RealNameApiUrl"];
|
||||
Funs.ControlApiUrl = ConfigurationManager.AppSettings["ControlApiUrl"];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -38,7 +39,7 @@
|
|||
try
|
||||
{
|
||||
string address = ConfigurationManager.AppSettings["endpoint"];
|
||||
Funs.SystemVersion = ConfigurationManager.AppSettings["SystemVersion"];
|
||||
Funs.SystemVersion = ConfigurationManager.AppSettings["SystemVersion"];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -49,7 +50,7 @@
|
|||
{
|
||||
BLL.RealNameMonitorService.StartInOutMonitor();
|
||||
if (ConfigurationManager.AppSettings["EnableRealName"] == "True")
|
||||
{
|
||||
{
|
||||
BLL.RealNameMonitorService.StartMonitor();
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +60,7 @@
|
|||
}
|
||||
////通用定时器
|
||||
try
|
||||
{
|
||||
{
|
||||
BLL.MonitorService.StartMonitor();
|
||||
BLL.MonitorService.StartMonitorEve();
|
||||
BLL.MonitorService.StartPersonQuarterCheck();
|
||||
|
@ -80,7 +81,7 @@
|
|||
}
|
||||
|
||||
protected void Application_BeginRequest(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
protected void Application_AuthenticateRequest(object sender, EventArgs e)
|
||||
|
@ -140,7 +141,7 @@
|
|||
{
|
||||
if (errLog != null)
|
||||
{
|
||||
db.Sys_ErrLogInfo.InsertOnSubmit(newErr);
|
||||
db.Sys_ErrLogInfo.InsertOnSubmit(newErr);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
|
|
@ -97,6 +97,9 @@
|
|||
Width="800px" Height="300px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuDown" OnClick="btnMenuDown_Click" EnablePostBack="true" runat="server" Icon="ArrowDown" Hidden="true"
|
||||
Text="抽取">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuAdd" OnClick="btnMenuAdd_Click" EnablePostBack="true" runat="server" Icon="Add" Hidden="true"
|
||||
Text="增加">
|
||||
</f:MenuButton>
|
||||
|
|
|
@ -8,6 +8,7 @@ using System.Web.UI;
|
|||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
|
@ -46,6 +47,7 @@ namespace FineUIPro.Web.ProjectData
|
|||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnMenuDown.Hidden = false;
|
||||
this.btnMenuAdd.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
|
@ -227,7 +229,33 @@ namespace FineUIPro.Web.ProjectData
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 右键增加、修改、删除方法
|
||||
#region 右键抽取、增加、修改、删除方法
|
||||
/// <summary>
|
||||
/// 抽取
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDown_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.trProjects.SelectedNode != null)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectInstallationMenuId, BLL.Const.BtnAdd))
|
||||
{
|
||||
string url = Funs.RealNameApiUrl + "/Projects/GetConstructionWbsList";
|
||||
string contenttype = "application/json;charset=utf-8";
|
||||
var returndata = BLL.APIGetHttpService.ControlHttp(Funs.ControlApiUrl + "/Projects/GetConstructionWbsList?ProjId=" + 2370, "GET", contenttype, null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择树节点!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键修改事件
|
||||
/// </summary>
|
||||
|
@ -348,7 +376,7 @@ namespace FineUIPro.Web.ProjectData
|
|||
|
||||
private void DeleteBaseData(string installationId)
|
||||
{
|
||||
Model.Project_Installation installation=BLL.Project_InstallationService.GetInstallationByInstallationId(installationId);
|
||||
Model.Project_Installation installation = BLL.Project_InstallationService.GetInstallationByInstallationId(installationId);
|
||||
if (installation.IsEnd == false)
|
||||
{
|
||||
BLL.Project_InstallationService.DeleteInstallation(installationId);
|
||||
|
|
|
@ -174,6 +174,15 @@ namespace FineUIPro.Web.ProjectData {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDown 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDown;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuAdd 控件。
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue