using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace web.Web.wx.Views.YZ
{
public partial class status : System.Web.UI.Page
{
public string _divHTML = "";
protected void Page_Load(object sender, EventArgs e)
{
string mblno = Request["mblno"];
_divHTML = SetupHTML(mblno);
}
public string SetupHTML(string mblno) {
StringBuilder sb = new StringBuilder();
Entities me = new Entities();
op_seae_billtrack bt = me.op_seae_billtrack.Where(o => o.MBLNO == mblno).First();
if (bt == null)
{
return "";
}
else
{
sb.Append("
"+mblno+"
");
sb.Append("");
sb.Append("
");
sb.Append("
");
string cls = bt.TiXiangShiJian == "已提箱" ? "liyes" : "lino";
sb.Append("- ");
sb.Append("" + bt.TiXiangShiJian + "");
sb.Append("");
sb.Append("
");
cls = bt.FanChangShiJian == "已返场" ? "liyes" : "lino";
sb.Append("- ");
sb.Append("" + bt.FanChangShiJian + "");
sb.Append("");
sb.Append("
");
cls = bt.FanChangShiJian == "已集港" ? "liyes" : "lino";
sb.Append("- ");
sb.Append("" + bt.JiGangShiJian + "");
sb.Append("");
sb.Append("
");
cls = bt.YunDiShiJian != null ? "liyes" : "lino";
sb.Append("- ");
sb.Append("运抵");
sb.Append("" + fmtDataTime(bt.YunDiShiJian) + "");
sb.Append("
");
cls = bt.CangDanShiJian != null ? "liyes" : "lino";
sb.Append("- ");
sb.Append("舱单");
sb.Append("" + fmtDataTime(bt.CangDanShiJian) + "");
sb.Append("
");
cls = bt.BaoGuanFangXing != null ? "liyes" : "lino";
sb.Append("- ");
sb.Append("报关");
sb.Append("" + fmtDataTime(bt.BaoGuanFangXing) + "");
sb.Append("
");
cls = bt.ZhuangZaiFangXing != null ? "liyes" : "lino";
sb.Append("- ");
sb.Append("装载");
sb.Append("" + fmtDataTime(bt.ZhuangZaiFangXing) + "");
sb.Append("
");
cls = bt.MaTouFangXing != null ? "liyes" : "lino";
sb.Append("- ");
sb.Append("码头");
sb.Append("" + bt.MaTouFangXing + "");
sb.Append("
");
cls = bt.KaiChuanShiJian != null ? "liyes" : "lino";
sb.Append("- ");
sb.Append("开船日期");
sb.Append("" + fmtDataTime(bt.KaiChuanShiJian) + "");
sb.Append("
");
cls = bt.ETA != null ? "liyes" : "lino";
sb.Append("- ");
sb.Append("ETA");
sb.Append("" + fmtDataTime(bt.ETA) + "");
sb.Append("
");
cls = bt.ATA != null ? "liyes" : "lino";
sb.Append("- ");
sb.Append("ATA");
sb.Append("" + fmtDataTime(bt.ATA) + "");
sb.Append("
");
sb.Append("
");
}
return sb.ToString();
}
private string fmtDataTime(DateTime? date)
{
if (date==null)
{
return "";
}
else
{
try
{
string d = date.Value.ToString("yyyy-MM-dd HH:mm:ss");
return d;
}
catch (Exception)
{
return "";
}
}
}
}
}