You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.7 KiB
C#
74 lines
2.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using DSWeb.MvcShipping.Models.MsSeaeOrder;
|
|
using DSWeb.MvcShipping.DAL.MsSeaeOrderDAL;
|
|
using DSWeb.Areas.Mobile.Models.Login;
|
|
using DSWeb.Areas.Mobile.DAL;
|
|
using System.Text;
|
|
|
|
namespace DSWeb.Areas.Mobile.Views.BookSpace
|
|
{
|
|
public partial class LSDC : System.Web.Mvc.ViewPage
|
|
{
|
|
public string _LSDCHTML = "";
|
|
protected void Page_Load ( object sender, EventArgs e )
|
|
{
|
|
SetupHTML();
|
|
|
|
}
|
|
|
|
private void SetupHTML ( ) {
|
|
string openid= Request.Cookies["openid"] == null ? "" : Request.Cookies["openid"].Value.ToString();
|
|
string querystr= SetupHiddenFiled();
|
|
//openid = "123";
|
|
User u = LoginDAL.GetUserWithOpenId(openid);
|
|
List<MsSeaeOrder> list = MsSeaeOrderDAL.GetDataList(0,100,querystr, u.uid, u.codename, u.comid);
|
|
StringBuilder sb = new StringBuilder();
|
|
foreach (MsSeaeOrder item in list)
|
|
{
|
|
sb.Append("<li>");
|
|
sb.Append("<a data-ajax=\"false\" href=\"/Mobile/BookSpace/XSDC?ordno="+item.ORDNO+"\">");
|
|
sb.Append("订舱编号:"+item.ORDNO+"["+item.ORSTATUSREF+"]" + "<br/>委托单位:" + item.CUSTOMERNAME + "<br/>");
|
|
sb.Append("订舱日期:"+item.BSDATE+"<br/>");
|
|
sb.Append("装 货 港:" + item.PORTLOAD + "<br/>");
|
|
sb.Append("卸 货 港:" + item.PORTDISCHARGE + "<br/>");
|
|
sb.Append("集 装 箱:"+(item.CNTRTOTAL==""?"-":item.CNTRTOTAL));
|
|
sb.Append("</a>");
|
|
sb.Append("</li>");
|
|
}
|
|
_LSDCHTML = sb.ToString();
|
|
|
|
|
|
}
|
|
|
|
private string SetupHiddenFiled () {
|
|
string zhg = Request.QueryString["zhg"] == null ? "" : Request.QueryString["zhg"];
|
|
string xhg = Request.QueryString["xhg"] == null ? "" : Request.QueryString["xhg"];
|
|
string dcrq = Request.QueryString["dcrq"] == null ? "" : Request.QueryString["dcrq"];
|
|
hdszhg.Value = zhg;
|
|
hdsxhg.Value = xhg;
|
|
hdsdcrq.Value = dcrq;
|
|
|
|
string qstr = " 1=1 ";
|
|
if (zhg!="")
|
|
{
|
|
qstr += "and B.PORTLOAD like '%"+zhg+"%' ";
|
|
}
|
|
if (xhg != "")
|
|
{
|
|
qstr += "and B.PORTDISCHARGE like '%" + xhg + "%' ";
|
|
}
|
|
if (dcrq != "")
|
|
{
|
|
qstr += "and ( CONVERT(varchar(100),BSDATE, 23) = '"+dcrq+"') ";
|
|
}
|
|
return qstr;
|
|
}
|
|
|
|
|
|
}
|
|
} |