欢迎使用 WordPress。这是您的第一篇日志。您可以编辑它或是删除它,然后开始写您自己的博客。
-
最新日志
最新评论
- 中国博客网 发表于《Hello world!》
- 中博网友 发表于《江波词》
- 中博网友 发表于《江波词》
- 中博网友 发表于《我的新作品TipPopup控件, 让你自定义Tooltips更快捷》
- 中博网友 发表于《我的新作品TipPopup控件, 让你自定义Tooltips更快捷》
存档页
分类
功能
比较系统的Silverlight 实例视频教程
http://www.zhenjiandan.com/SerialPage_46.html
前台程序
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StationThumbnailReport.aspx.cs" Inherits="HomePage.StationThumbnailReport" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
<mobile:Form ID="form1" Runat="server">
<mobile:ObjectList ID="olTable" Runat="server" AutoGenerateFields="False" CommandStyle-StyleReference="subcommand" LabelStyle-StyleReference="title" OnItemCommand="olTable_ItemCommand" TableFields="Name;State;SubTotal" DefaultCommand="View" >
<Command Name="View" Text="查看" />
<Field Name="Name" DataField="Name" Title="桌台" />
<Field Name="State" DataField="Text_State" Title="状态" />
<Field Name="SubTotal" DataField="Text_SubTotal" Title="小计" />
<Field Name="TableId" DataField="Id" Title="桌台号" Visible="False" />
</mobile:ObjectList>
<mobile:Label ID="lblSummary" Runat="server" />
</mobile:Form>
</body>
</html>
后台程序
public partial class StationThumbnailReport : System.Web.UI.MobileControls.MobilePage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataBind();
}
}
public override void DataBind()
{
//base.DataBind();
Station stationInstance = DBProvider.GetActiveStations(RightHandler.CurConsumerId).Find(p => p.AId == CurStationId);
if (stationInstance != null)
{
CustomBinding binding = new CustomBinding();
binding.Elements.Add(new TextMessageEncodingBindingElement(MessageVersion.Soap11, Encoding.UTF
);
binding.Elements.Add(new HttpTransportBindingElement());
string remoteAddress = "http://" + stationInstance.Ip + ":" + stationInstance.Port.ToString() + "/WAPRemoteService";
EndpointAddress endpoint = new EndpointAddress(remoteAddress);
WAPRemoteServiceClient serviceProxy = new WAPRemoteServiceClient(binding, endpoint);
StationThumbnailReportStore reportStore = serviceProxy.GetStationThumbnailReportStore();
lblSummary.Text = string.Format("桌台总数:{0} 人数:{1} 空闲:{2} 预定:{3} 使用:{4} 金额:{5}" ,
reportStore.TableCount, reportStore.PeopleCount, reportStore.FreeCount, reportStore.ReserveCount, reportStore.UsingCount, reportStore.MoneyAmount);
olTable.DataSource = reportStore.Tables;
olTable.DataBind();
}
}
protected void olTable_ItemCommand(object sender, ObjectListCommandEventArgs e)
{
if (e.CommandName == "View")
{
Server.Transfer(string.Format("StationTableReport.aspx?StationId={0}&TableId={1}", CurStationId, e.ListItem["TableId"]));
}
}
public int CurStationId
{
get
{
int iCurStationId = UnAssignedId;
string txtStationId = Request.Params["StationId"];
if (txtStationId != null && txtStationId.Trim() != "")
{
iCurStationId = int.Parse(txtStationId);
}
return iCurStationId;
}
}
protected const int UnAssignedId = -1;
}
AssignFile(F,'COM1: 9600, N, 8, 2, ASC');
1.禁用或设置 Indexing Service 服务
2.检查 Bin 目录的访问权限
3.设置 Temporary ASP.NET Files 目录的访问权限
4.设置 WindowsTemp 的权限
给Network service添加FULL CONTROL权限。即:设置 Temporary ASP.NET Files 目录和WindowsTemp 访问用户为aspnet和Network service,权限为FULL CONTROL
解决showModelessDialog()页面中postback 打开新页面的问题;
<head>
<base target="_self">
</head>