学 赵
4 years ago
5 changed files with 264 additions and 0 deletions
@ -0,0 +1,54 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UNIAPI.aspx.cs" Inherits="SCP.Admin.UNIAPI" %> |
|||
|
|||
<!DOCTYPE html> |
|||
|
|||
<!DOCTYPE html> |
|||
|
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head runat="server"> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
|||
<title></title> |
|||
</head> |
|||
<body> |
|||
|
|||
|
|||
<form id="form1" runat="server"> |
|||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar2" runat="server"> |
|||
<Items> |
|||
<f:DropDownList runat="server" ID="DDL_State" Label="查询接口"> |
|||
<f:ListItem Text="订单接口" Value="xxqad_pod_det"/> |
|||
<f:ListItem Text="QAD收货单接口" Value="xxqad_prh_det" /> |
|||
<f:ListItem Text="WMS收货单接口" Value="xxwms_rc_det" /> |
|||
<f:ListItem Text="发货单接口" Value="xxscm_tx_mstr" /> |
|||
<f:ListItem Text="发票接口" Value="xxscm_inv_det" /> |
|||
</f:DropDownList> |
|||
<f:TextArea runat="server" Label="单据号" ID="TXT_billnum" Width="600" ></f:TextArea> |
|||
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找"> |
|||
</f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
</f:Form> |
|||
|
|||
|
|||
<f:Grid ID = "Grid" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" |
|||
> |
|||
|
|||
<Columns> |
|||
|
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
|
|||
</form> |
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,74 @@ |
|||
using CK.SCP.Controller; |
|||
using FineUI; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Data; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Web; |
|||
using System.Web.UI; |
|||
using System.Web.UI.WebControls; |
|||
|
|||
namespace SCP.Admin |
|||
{ |
|||
public partial class UNIAPI : PageBase |
|||
{ |
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!Page.IsPostBack) |
|||
{ |
|||
Bind(); |
|||
} |
|||
} |
|||
private void Bind() |
|||
{ |
|||
var _domain = Request["Domain"]; |
|||
var _billNum =TXT_billnum.Text= Request.Params["BillNum"]; |
|||
var _tableName=DDL_State.SelectedValue= Request.Params["TableName"]; |
|||
if (!string.IsNullOrEmpty(_billNum) && !string.IsNullOrEmpty(_domain) && !string.IsNullOrEmpty(_tableName)) |
|||
{ |
|||
var _ary = _billNum.Split(new char[] { ',' }).ToList(); |
|||
var sqlstr = string.Empty; |
|||
_ary.ForEach(p => |
|||
{ |
|||
sqlstr += string.Format("'{0}',", p); |
|||
}); |
|||
sqlstr = sqlstr.Substring(0, sqlstr.Length - 1); |
|||
DataTable _dt = UniApiController.FindUniapi(_tableName, sqlstr, _domain); |
|||
foreach (DataColumn column in _dt.Columns) |
|||
{ |
|||
FineUI.BoundField bf; |
|||
bf = new FineUI.BoundField(); |
|||
bf.DataField = column.ColumnName; |
|||
bf.SortField = column.ColumnName; |
|||
bf.HeaderText = column.ColumnName; |
|||
Grid.Columns.Add(bf); |
|||
} |
|||
Grid.DataSource = _dt; |
|||
Grid.DataBind(); |
|||
} |
|||
} |
|||
|
|||
protected void BtnSearch_Click(object sender, EventArgs e) |
|||
{ |
|||
StringBuilder _buffer = new StringBuilder(); |
|||
if (!string.IsNullOrEmpty(DDL_State.SelectedValue)) |
|||
{ |
|||
_buffer.AppendFormat("TableName={0}&&", DDL_State.SelectedValue); |
|||
} |
|||
if (!string.IsNullOrEmpty(TXT_billnum.Text)) |
|||
{ |
|||
_buffer.AppendFormat("BillNum={0}&&", TXT_billnum.Text); |
|||
} |
|||
if (!string.IsNullOrEmpty(CurrentUser.UsedDomain)) |
|||
{ |
|||
_buffer.AppendFormat("Domain={0}",CurrentUser.UsedDomain); |
|||
} |
|||
string s = _buffer.ToString(); |
|||
PageContext.Redirect(string.Format("UNIAPI.aspx?{0}", s)); |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
|
@ -0,0 +1,78 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Admin { |
|||
|
|||
|
|||
public partial class UNIAPI { |
|||
|
|||
/// <summary>
|
|||
/// form1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar2; |
|||
|
|||
/// <summary>
|
|||
/// DDL_State 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList DDL_State; |
|||
|
|||
/// <summary>
|
|||
/// TXT_billnum 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextArea TXT_billnum; |
|||
|
|||
/// <summary>
|
|||
/// BtnSearch 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button BtnSearch; |
|||
|
|||
/// <summary>
|
|||
/// Grid 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid; |
|||
} |
|||
} |
Loading…
Reference in new issue