using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web.UI; using System.Web.UI.WebControls; using SuperMap.RealEstate.CoreFrameWork; using SuperMap.RealEstate.ServiceModel; using SuperMap.RealEstate.Utility; using SuperMap.RealEstate.Web.UI; using SuperMap.RealEstate.Web.UI.WebControls; using SuperMap.RealEstate.Web.Utility; using Business = SuperMap.RealEstate.ExchangeData.Business; namespace SuperMap.RealEstate.HighWay.Modules.ServerPartMachine { public partial class MACHINEPOINTPage : BasePage { protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) return; //初始化并加载列表 GridViewEx1.SelectingWithInit(ObjectDataSource1, GridPageEx1); } //查询 protected void ButtonSearch_CallBackClick(object sender, ClientSetEventArgs e) { GridViewEx1.Selecting(ObjectDataSource1, GridPageEx1); //设置UI变化 e.SetValue(GridViewEx1); e.SetValue(GridPageEx1); } //翻页事件 protected void GridPageEx1_CallBackPageChanged(object src, ClientSetEventArgs e) { GridViewEx1.Pagging(ObjectDataSource1, GridPageEx1); //设置UI变化 e.SetValue(GridViewEx1); } //查询SQL设置 protected void GridViewEx1_SelectMethodParameters(object sender, SelectMethodParametersArgs e) { //且搜索条件 if (!string.IsNullOrEmpty(Request["SERVERPARTCODE"])) { e.AddAndParams("SERVERPARTCODE", Request["SERVERPARTCODE"].ToDecrypt()); } if (!string.IsNullOrEmpty(Request["SHOPCODE"])) { e.AddAndParams("SHOPCODE", Request["SHOPCODE"].ToDecrypt()); } //或搜索条件 //e.AddOrParams(字段名, 值); //排序 e.AddOrderByParams("POINT_DATE", true); } protected void GridViewEx1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { LinkButton SearchMachine = (LinkButton)e.Row.FindControl("SearchMachine"); SearchMachine.OnClientClick = GridViewEx1.GetOpenPopDialogClientScript( "/ExchangeData/Modules/MachineInfo/MACHINEINFOPage.aspx?SERVERPARTCODE=" + Request["SERVERPARTCODE"] + "&SHOPCODE=" + Request["SHOPCODE"] + "&MACHINE_MACADDRESS=" + e.Row.Cells[5].Text.ToEncrypt(), 900, 300); e.Row.Attributes["onclick"] = GridViewEx1.GetOpenPopDialogClientScript( "/ExchangeData/Modules/MachineInfo/MACHINEPOINTPage.aspx?SERVERPARTCODE=" + Request["SERVERPARTCODE"] + "&SHOPCODE=" + Request["SHOPCODE"] + "&MACHINE_MACADDRESS=" + e.Row.Cells[5].Text.ToEncrypt(), 800, 300); e.Row.ToolTip = e.Row.Cells[e.Row.Cells.Count - 1].Text.Replace(" ", "").Replace("|", ","); if (e.Row.Cells[e.Row.Cells.Count - 1].Text.Length > 15) { e.Row.Cells[e.Row.Cells.Count - 1].Text = e.Row.Cells[e.Row.Cells.Count - 1].Text.Replace("|", ",").Substring(0, 15) + "..."; } else { e.Row.Cells[e.Row.Cells.Count - 1].Text = e.Row.Cells[e.Row.Cells.Count - 1].Text.Replace("|", ","); } } } } }