117 lines
5.6 KiB
C#
117 lines
5.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace SuperMap.RealEstate.ExchangeData.Modules.EXCEPTION
|
|
{
|
|
public partial class PLAYERSHOWINFO : System.Web.UI.Page
|
|
{
|
|
protected string VideoIP = System.Configuration.ConfigurationManager.AppSettings["VideoIP"].ToString();
|
|
protected string VideoPort = System.Configuration.ConfigurationManager.AppSettings["VideoPort"].ToString();
|
|
protected string LogUserName = System.Configuration.ConfigurationManager.AppSettings["LogUserName"].ToString();
|
|
protected string LogPassword = System.Configuration.ConfigurationManager.AppSettings["LogPassword"].ToString();
|
|
protected string LoginPort = System.Configuration.ConfigurationManager.AppSettings["LoginPort"].ToString();
|
|
public int _VIDEO_IP;
|
|
public string _EXCEPTIONTYPE;
|
|
public string _EXCEPTION_DATE;
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
|
|
if (!string.IsNullOrEmpty(Request["SERVERPARTNAME"]))
|
|
{
|
|
SERVERPARTNAME.InnerText = Request["SERVERPARTNAME"].ToDecrypt();
|
|
}
|
|
if (!string.IsNullOrEmpty(Request["SHOPNAME"]))
|
|
{
|
|
SHOPNAME.InnerText = Request["SHOPNAME"].ToDecrypt();
|
|
}
|
|
if (!string.IsNullOrEmpty(Request["WORKERNAME"]))
|
|
{
|
|
WORKERNAME.InnerText = Request["WORKERNAME"].ToDecrypt();
|
|
}
|
|
if (!string.IsNullOrEmpty(Request["EXCEPTIONCOUNT"]))
|
|
{
|
|
EXCEPTIONCOUNT.InnerText = Request["EXCEPTIONCOUNT"].ToDecrypt();
|
|
}
|
|
if (!string.IsNullOrEmpty(Request["EXCEPTIONAMOUNT"]))
|
|
{
|
|
EXCEPTIONAMOUNT.InnerText = Request["EXCEPTIONAMOUNT"].ToDecrypt();
|
|
}
|
|
if (!string.IsNullOrEmpty(Request["COMMODITY_NAME"]))
|
|
{
|
|
COMMODITY_NAME.InnerText = Request["COMMODITY_NAME"].ToDecrypt();
|
|
}
|
|
if (!string.IsNullOrEmpty(Request["COMMODITY_BARCODE"]))
|
|
{
|
|
COMMODITY_BARCODE.InnerText = Request["COMMODITY_BARCODE"].ToDecrypt();
|
|
}
|
|
if (!string.IsNullOrEmpty(Request["COMMODITY_RETAILPRICE"]))
|
|
{
|
|
COMMODITY_RETAILPRICE.InnerText = Request["COMMODITY_RETAILPRICE"].ToDecrypt();
|
|
}
|
|
if (!string.IsNullOrEmpty(Request["EXCEPTION_DATE"]))
|
|
{
|
|
_EXCEPTION_DATE = Convert.ToDateTime(Request["EXCEPTION_DATE"].ToDecrypt()).ToString("yyyy-MM-dd HH:mm:ss");
|
|
EXCEPTION_DATE.InnerText = Request["EXCEPTION_DATE"].ToDecrypt();
|
|
starttime.Value = Convert.ToDateTime(Request["EXCEPTION_DATE"].ToDecrypt()
|
|
).AddSeconds(-90).ToString("yyyy-MM-dd HH:mm:ss");
|
|
endtime.Value = Convert.ToDateTime(Request["EXCEPTION_DATE"].ToDecrypt()
|
|
).AddSeconds(90).ToString("yyyy-MM-dd HH:mm:ss");
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(Request["VIDEO_IP"]))
|
|
{
|
|
_VIDEO_IP = Convert.ToInt32(Request["VIDEO_IP"].ToDecrypt());
|
|
}
|
|
else if (!string.IsNullOrEmpty(Request["SERVERPARTCODE"]) && !string.IsNullOrEmpty(Request["SHOPCODE"]) &&
|
|
!string.IsNullOrEmpty(Request["MACHINECODE"]))
|
|
{
|
|
ServiceModel.Transaction _Transaction = new ServiceModel.Transaction();
|
|
DataTable _DataTable = new Business.SHOPVIDEO(_Transaction).ExecuteDataTable(@"SELECT A.*
|
|
FROM HIGHWAY_EXCHANGE.T_SHOPVIDEO A,HIGHWAY_EXCHANGE.T_MACHINEINFO B
|
|
WHERE A.SERVERPARTCODE = B.SERVERPARTCODE AND A.SHOPCODE = B.SHOPCODE AND
|
|
A.MACHINENAME = B.MACHINENAME AND A.SERVERPARTCODE = '" + Request["SERVERPARTCODE"].ToDecrypt() +
|
|
"' AND A.SHOPCODE = '" + Request["SHOPCODE"].ToDecrypt() + "' AND B.MACHINECODE = '" +
|
|
Request["MACHINECODE"].ToDecrypt() + "'");
|
|
if (_DataTable.Rows.Count > 0)
|
|
{
|
|
_VIDEO_IP = string.IsNullOrEmpty(_DataTable.Rows[0]["VIDEO_IP"].ToString()) ? 0 :
|
|
int.Parse(_DataTable.Rows[0]["VIDEO_IP"].ToString());
|
|
}
|
|
}
|
|
if (!string.IsNullOrEmpty(Request["EXCEPTIONTYPE"]))
|
|
{
|
|
_EXCEPTIONTYPE = Request["EXCEPTIONTYPE"].ToDecrypt();
|
|
EXCEPTIONTYPE.InnerText = Request["EXCEPTIONTYPE"].ToDecrypt();
|
|
}
|
|
EXCEPTIONDATE.Value = _EXCEPTION_DATE;
|
|
if (Request["SHOPREGION"].ToDecrypt() == "10" || Request["SHOPREGION"].ToDecrypt() == "20")
|
|
{
|
|
loginip.Value = VideoIP.Split(',')[0];
|
|
port.Value = LoginPort.Split(',')[0];
|
|
deviceport.Value = VideoPort.Split(',')[0];
|
|
}
|
|
else if (Request["SHOPREGION"].ToDecrypt() == "30" || Request["SHOPREGION"].ToDecrypt() == "40")
|
|
{
|
|
loginip.Value = VideoIP.Split(',')[1];
|
|
port.Value = LoginPort.Split(',')[1];
|
|
deviceport.Value = VideoPort.Split(',')[1];
|
|
}
|
|
else
|
|
{
|
|
loginip.Value = VideoIP;
|
|
port.Value = LoginPort;
|
|
deviceport.Value = VideoPort;
|
|
}
|
|
//loginip.Value = Request.Url.Host;
|
|
username.Value = LogUserName;
|
|
password.Value = LogPassword;
|
|
}
|
|
}
|
|
} |