using System; using System.Collections; using System.Configuration; using System.Data; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Collections.Generic; using System.Text; using DSWeb.Models; using DSWeb.EntityDA; using DSWeb.Authority; namespace DSWeb.BaseInfo { public partial class OpSeaiBaseInfo : System.Web.UI.Page { private string strUserID; private string strCompanyID;//公司GID private string strShowName;//用户显示名 private string strDeptName;//部门名称 private string strHandle; private string strBSNO; protected void Page_Load(object sender, EventArgs e) { if (Session["USERID"] != null) { strUserID = Session["USERID"].ToString(); } if (Session["SHOWNAME"] != null) { strShowName = Session["SHOWNAME"].ToString(); } if (Session["COMPANYID"] != null) { strCompanyID = Session["COMPANYID"].ToString(); } if (Session["DEPTNAME"] != null) { strDeptName = Session["DEPTNAME"].ToString(); } if (Request.QueryString["handle"] != null) { strHandle = Request.QueryString["handle"].ToString().ToLower().Trim(); } if (Request.QueryString["bsno"] != null) { strBSNO = Request.QueryString["bsno"].ToString(); h_bsno.Value = strBSNO; } if (strHandle != null) { if (strBSNO != null) { GetOpSeaiInfo(); GetSeaImportInfoBlissueSur(strBSNO); GetOpStatus(strBSNO); } int iRecvAuthorityStatus = 0; int iPayAuthorityStatus = 0; UserAuthorityManage userRecvAuthorityManage = new UserAuthorityManage(strUserID, "modRecvFeeManagement"); if (userRecvAuthorityManage.OperateType != AuthorityType.NULL) { iRecvAuthorityStatus = userRecvAuthorityManage.CheckOperateRange(ModuleType.SEAIRECVFEE, userRecvAuthorityManage.OperateType, strShowName, strCompanyID, strDeptName, strBSNO, "", strUserID); h_recvauthority.Value = iRecvAuthorityStatus.ToString(); } else { h_recvauthority.Value = "1"; } //UserAuthorityManage userPayAuthorityManage = new UserAuthorityManage(strUserID, "modPayFeeManagement"); UserAuthorityManage userSeaiPayAuthorityManage = new UserAuthorityManage(strUserID, "modSeaiPayFeeManagement"); if (userSeaiPayAuthorityManage.OperateType != AuthorityType.NULL) { iPayAuthorityStatus = userSeaiPayAuthorityManage.CheckOperateRange(ModuleType.SEAIPAYFEE, userSeaiPayAuthorityManage.OperateType, strShowName, strCompanyID, strDeptName, strBSNO, "", strUserID); h_payauthority.Value = iPayAuthorityStatus.ToString(); } else { h_payauthority.Value = "1"; } } } private void GetOpStatus(string tempBSNO) { StringBuilder resultBuilder = new StringBuilder(); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
业务状态
"); resultBuilder.Append("
完成时间
"); resultBuilder.Append("
完成人
"); resultBuilder.Append("
备注
"); OpStatusDA opStatusDA = new OpStatusDA(); IList opStatusEntities = new List(); opStatusEntities = opStatusDA.GetOpStatusByBSNO(tempBSNO); if (opStatusEntities.Count > 0) { for (int i = 0; i < opStatusEntities.Count; i++) { if (i == opStatusEntities.Count - 1) { resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
" + opStatusEntities[i].GID + "
"); resultBuilder.Append("
" + opStatusEntities[i].Status + "
"); resultBuilder.Append("
" + opStatusEntities[i].CompleteTime + "
"); resultBuilder.Append("
" + opStatusEntities[i].CompleteOperator + "
"); resultBuilder.Append("
" + opStatusEntities[i].Remark + "
"); resultBuilder.Append("
"); } else { resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
" + opStatusEntities[i].GID + "
"); resultBuilder.Append("
" + opStatusEntities[i].Status + "
"); resultBuilder.Append("
" + opStatusEntities[i].CompleteTime + "
"); resultBuilder.Append("
" + opStatusEntities[i].CompleteOperator + "
"); resultBuilder.Append("
" + opStatusEntities[i].Remark + "
"); resultBuilder.Append("
"); } } } else { resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); } dvOpStatus.InnerHtml = resultBuilder.ToString(); } //获取提单签发信息 private void GetSeaImportInfoBlissueSur(string tempBSNO) { StringBuilder resultBuilder = new StringBuilder(); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
处理状态
"); resultBuilder.Append("
处理人
"); resultBuilder.Append("
处理时间
"); resultBuilder.Append("
备注
"); OpBlissueDA opBlissueDA = new OpBlissueDA(); IList opBlissueEntities = new List(); //根据委托业务BSNO获取提前签发所有信息 opBlissueEntities = opBlissueDA.GetOpBlissueByBSNO(tempBSNO); if (opBlissueEntities.Count > 0) { for (int i = 0; i < opBlissueEntities.Count; i++) { if (i == opBlissueEntities.Count - 1) { resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
" + opBlissueEntities[i].ID + "
"); resultBuilder.Append("
" + opBlissueEntities[i].BLSTATUS + "
"); resultBuilder.Append("
" + opBlissueEntities[i].OPNAME + "
"); resultBuilder.Append("
" + opBlissueEntities[i].OPTIME + "
"); resultBuilder.Append("
" + opBlissueEntities[i].REMARK + "
"); resultBuilder.Append("
"); } else { resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
" + opBlissueEntities[i].ID + "
"); resultBuilder.Append("
" + opBlissueEntities[i].BLSTATUS + "
"); resultBuilder.Append("
" + opBlissueEntities[i].OPNAME + "
"); resultBuilder.Append("
" + opBlissueEntities[i].OPTIME + "
"); resultBuilder.Append("
" + opBlissueEntities[i].REMARK + "
"); resultBuilder.Append("
"); } } } else { resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); resultBuilder.Append("
"); } dvBlissue.InnerHtml = resultBuilder.ToString(); } private void GetOpSeaiInfo() { SeaImportInfoDA seaImportDA = new SeaImportInfoDA(); TopSeaiEntity topSeiEntity = seaImportDA.GetID(strBSNO); if (topSeiEntity.BSNO != null) { ////委托业务编号 //dvOrderNumVal.Value = topSeaEntity.BSNO; //委托编号 dvCustnoVal.InnerHtml = topSeiEntity.CUSTNO; //主提单号 //dvMblnoVal.InnerHtml = topSeiEntity.MBLNO; //箱型箱量 dvCtntotalVal.InnerHtml = topSeiEntity.CNTRTOTAL; ////付费方式 //dvPaymentVal.InnerHtml = topSeiEntity.BLFRT; //揽货人 dvChannelSaleVal.InnerHtml = topSeiEntity.SALE; //委托单位 dvCustomerVal.InnerHtml = topSeiEntity.CUSTOMERNAME; //卸货港 dvDischargePortVal.InnerHtml = topSeiEntity.PORTDISCHARGE; ////MBL付费方式 //dvPaymentMBLVal.InnerHtml = topSeiEntity.MBLFRT; //业务来源 dvBssourceVal.InnerHtml = topSeiEntity.BSSOURCE; ////航线 //dvLaneVal.InnerHtml = topSeiEntity.LANE; //船名 dvVesselVal.InnerHtml = topSeiEntity.VESSEL; //航次 dvVoynoVal.InnerHtml = topSeiEntity.VOYNO; //毛重 dvKGSVal.InnerHtml = topSeiEntity.KGS.ToString().Trim(); //毛重 dvNETWEIGHTVal.InnerHtml = topSeiEntity.NETWEIGHT.ToString().Trim(); ////是否熏蒸 //ck_isfumigation.Checked = topSeiEntity.ISFUMIGATION; ////是否仓储 //ck_isstorage.Checked = topSeiEntity.ISSTORAGE; ////是否陆运 //ck_island.Checked = topSeiEntity.ISLAND; ////是否报关 //ck_iscustoms.Checked = topSeiEntity.ISCUSTOMS; ////是否报检 //ck_isinspection.Checked = topSeiEntity.ISINSPECTION; ////是否订舱 //ck_isbooking.Checked = topSeiEntity.ISBOOKING; ////使用代理 //ck_isagent.Checked = topSeiEntity.ISAGENT; ////分单签单 //ck_ishblno.Checked = topSeiEntity.ISHBLNO; } } } }