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 OpSeaeBaseInfo : 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) { GetOpSeaeInfo(); GetSeaExportInfoBlissueSur(strBSNO); GetOpStatus(strBSNO); } int iRecvAuthorityStatus = 0; int iPayAuthorityStatus = 0; UserAuthorityManage userRecvAuthorityManage = new UserAuthorityManage(strUserID, "modRecvFeeManagement"); if (userRecvAuthorityManage.OperateType != AuthorityType.NULL) { iRecvAuthorityStatus = userRecvAuthorityManage.CheckOperateRange(ModuleType.RECVFEE, userRecvAuthorityManage.OperateType, strShowName, strCompanyID, strDeptName, strBSNO, "", strUserID); h_recvauthority.Value = iRecvAuthorityStatus.ToString(); } else { h_recvauthority.Value = "1"; } UserAuthorityManage userPayAuthorityManage = new UserAuthorityManage(strUserID, "modPayFeeManagement"); if (userPayAuthorityManage.OperateType != AuthorityType.NULL) { iPayAuthorityStatus = userPayAuthorityManage.CheckOperateRange(ModuleType.PAYFEE, userPayAuthorityManage.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 GetSeaExportInfoBlissueSur(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(); 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 GetOpSeaeInfo() { SeaExportInfoDA seaExportDA = new SeaExportInfoDA(); TopSeaeEntity topSeaEntity = seaExportDA.GetID(strBSNO); if (topSeaEntity.BSNO != null) { ////委托业务编号 //dvOrderNumVal.Value = topSeaEntity.BSNO; //委托编号 dvCustnoVal.InnerHtml = topSeaEntity.CUSTNO; //主提单号 dvMblnoVal.InnerHtml = topSeaEntity.MBLNO; //箱型箱量 dvCtntotalVal.InnerHtml = topSeaEntity.CNTRTOTAL; //付费方式 dvPaymentVal.InnerHtml = topSeaEntity.BLFRT; //揽货人 dvChannelSaleVal.InnerHtml = topSeaEntity.SALE; //委托单位 dvCustomerVal.InnerHtml = topSeaEntity.CUSTOMERNAME; //卸货港 dvDischargePortVal.InnerHtml = topSeaEntity.PORTDISCHARGE; //毛重 dvKGSVal.InnerHtml = topSeaEntity.KGS.ToString().Trim(); //MBL付费方式 dvPaymentMBLVal.InnerHtml = topSeaEntity.MBLFRT; //业务来源 dvBssourceVal.InnerHtml = topSeaEntity.BSSOURCE; //航线 dvLaneVal.InnerHtml = topSeaEntity.LANE; //船名 dvVesselVal.InnerHtml = topSeaEntity.VESSEL; //航次 dvVoynoVal.InnerHtml = topSeaEntity.VOYNO; //是否熏蒸 ck_isfumigation.Checked = topSeaEntity.ISFUMIGATION; //是否仓储 ck_isstorage.Checked = topSeaEntity.ISSTORAGE; //是否陆运 ck_island.Checked = topSeaEntity.ISLAND; //是否报关 ck_iscustoms.Checked = topSeaEntity.ISCUSTOMS; //是否报检 ck_isinspection.Checked = topSeaEntity.ISINSPECTION; //是否订舱 ck_isbooking.Checked = topSeaEntity.ISBOOKING; //使用代理 ck_isagent.Checked = topSeaEntity.ISAGENT; //分单签单 ck_ishblno.Checked = topSeaEntity.ISHBLNO; } } } }