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; using DSWeb.MvcShipping.DAL.MsCrmPriceCarrierDAL; using DSWeb.MvcShipping.Models.MsCrmPriceCarrier; using DSWeb.Areas.CommMng.Models; using DSWeb.Areas.CommMng.DAL; using DSWeb.MvcShipping.DAL.MsCrmPriceCarrierListDAL; namespace DSWeb.Areas.Mobile.Views.YunJia { public partial class YJCX : System.Web.Mvc.ViewPage { public string _YJCXHTML = ""; public string _QYGHTML = ""; protected void Page_Load ( object sender, EventArgs e ) { SetupHTML(); } private void SetupHTML ( ) { string openid = Request.Cookies["openid"] == null ? "123" : Request.Cookies["openid"].Value.ToString(); string querystr = SetupHiddenFiled(); User u = LoginDAL.GetUserWithOpenId(openid); List list = MsCrmPriceCarrierListDAL.GetDataList(querystr, 0, 1000, u.uid, u.showname, u.comid, ""); StringBuilder sb = new StringBuilder(); foreach (MsCrmPriceCarrier item in list) { sb.Append("
  • "); // sb.Append(""); sb.Append("" + "" + item.PODLOAD + "-"); if (item.VIA=="") { sb.Append("直达-" + item.PORTDISCHARGE ); } else { sb.Append(item.VIA+"-" + item.PORTDISCHARGE ); } sb.Append("
    "); sb.Append("船公司/船期:" + item.CARRIER + "/" + item.ETD+"
    "); string validate = item.VALIDDATE.ToString("yyyy-MM-dd"); sb.Append("有效期/航程:" + validate + "/" + item.TT + "
    "); sb.Append("底价:小柜/大柜/超高:
    "+item.CTN00+"/"+item.CTN10+"/"+item.CTN20+"
    "); sb.Append("报价:小柜/大柜/超高:
    " + item.CTN02 + "/" + item.CTN12 + "/" + item.CTN22 + "
    "); // sb.Append("
    "); sb.Append("
  • "); } _YJCXHTML = sb.ToString(); //查询下拉框 //起运港下拉框 List listQyg = BasicDataRefDAL.GetCodeLoadportList(); StringBuilder sbQyg = new StringBuilder(); //foreach (var item in listQyg) //{ // sbQyg.Append(""); //} _QYGHTML = sbQyg.ToString(); } private string SetupHiddenFiled ( ) { string qyg = Request.QueryString["qyg"] == null ? "" : Request.QueryString["qyg"]; string xhg = Request.QueryString["xhg"] == null ? "" : Request.QueryString["xhg"]; string cgs = Request.QueryString["cgs"] == null ? "" : Request.QueryString["cgs"]; string ksrq = Request.QueryString["ksrq"] == null ? "" : Request.QueryString["ksrq"]; string jsrq = Request.QueryString["jsrq"] == null ? "" : Request.QueryString["jsrq"]; hdsqyg.Value = qyg; hdsxhg.Value = xhg; hdscgs.Value = cgs; hdsksrq.Value = ksrq; hdsjsrq.Value = jsrq; string qstr = " 1=1 and ISISSUE =1 "; if (qyg != "") { qstr += "and PODLOAD like '%" + qyg + "%' "; } if (xhg != "") { qstr += "and PORTDISCHARGE like '%" + xhg + "%' "; } if (cgs!="") { qstr += "and CARRIER like '%" + cgs + "%'"; } if (ksrq != "") { qstr += "and VALIDDATE >= '" + ksrq + "'"; } if (jsrq != "") { qstr += "and VALIDDATE <= '" + jsrq + "'"; } return qstr; } } }