|
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
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.Xml.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Data.SqlClient;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Xml;
|
|
|
|
|
using DSWeb.Models;
|
|
|
|
|
using DSWeb.EntityDA;
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.FeeCodes
|
|
|
|
|
{
|
|
|
|
|
public partial class RangeAdapter : System.Web.UI.Page
|
|
|
|
|
{
|
|
|
|
|
private string strGID = "";
|
|
|
|
|
private string RangeID = "";
|
|
|
|
|
private string RangeName = "";
|
|
|
|
|
private string strPortName = "";
|
|
|
|
|
RangeDA RangeDA = new RangeDA();
|
|
|
|
|
public string strUserID;//用户GID
|
|
|
|
|
private string strCompanyID;//公司GID
|
|
|
|
|
private string strShowName;//用户显示名
|
|
|
|
|
private string strDeptName;//部门名称
|
|
|
|
|
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (Session["USERID"] != null)
|
|
|
|
|
{
|
|
|
|
|
strUserID = Session["USERID"].ToString().Trim();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Server.Transfer("~/Error/FriendError.aspx");
|
|
|
|
|
return;
|
|
|
|
|
//strUserID = "";
|
|
|
|
|
}
|
|
|
|
|
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["strGID"] != null)
|
|
|
|
|
{
|
|
|
|
|
strGID = Request.QueryString["strGID"].ToString();
|
|
|
|
|
}
|
|
|
|
|
if (Request.QueryString["RangeID"] != null)
|
|
|
|
|
{
|
|
|
|
|
RangeID = Request.QueryString["RangeID"].ToString();
|
|
|
|
|
}
|
|
|
|
|
if (Request.QueryString["RangeName"] != null)
|
|
|
|
|
{
|
|
|
|
|
UnicodeEncoding unicode = new UnicodeEncoding();
|
|
|
|
|
RangeName = unicode.GetString(unicode.GetBytes(Request.QueryString["RangeName"].ToString()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
if (RangeName == "modExchangesUnit")//获取(modExchangesUnit)往来单位列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetUnitCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetUnitPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modSeaeOrderList")//获取(modSeaeOrderList)销售订舱列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmSeaeOrderCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmSeaeOrderDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmSeaeOrderPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modSeaeOrderAudit")//获取(modSeaeOrderAudit)销售订舱审核
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmSeaeOrderCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmSeaeOrderDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmSeaeOrderPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modOrderManagement")//获取(modOrderManagement)委托管理列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetOrderManagementCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetOrderManagementDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetOrderManagementPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "openSeaeInfoLock")//验证出口委托管理的中解锁信息的权限
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.OpenSeaeInfoLockPartCompany(strUserID.Trim(),strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.OpenSeaeInfoLockDepartment(strUserID.Trim(),strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.OpenSeaeInfoLockPerson(strUserID.Trim(),strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "openSeaiInfoLock")//验证进口委托管理的中解锁信息的权限
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.OpenSeaiInfoLockPartCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.OpenSeaiInfoLockDepartment(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.OpenSeaiInfoLockPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "openSeaiInfoUnLock")//验证进口委托管理的中解锁信息的权限
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.OpenSeaiInfoUnLockPartCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.OpenSeaiInfoUnLockDepartment(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.OpenSeaiInfoUnLockPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modSeaExportInfoBlissuelist")//获取(modSeaExportInfoBlissuelist)提单签发列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetBlissueListCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetBlissueListDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetBlissueListPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modSeaExportInfoBlissueSelect")//获取(modSeaExportInfoBlissueSelect)提单流转查询
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetBlissueSelectCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetBlissueSelectDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetBlissueSelectPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modSeaImportList")//获取(modSeaImportList)海运进口委托管理列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetSeaImportListCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetSeaImportListDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetSeaImportListPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modEBPricequeryLogList")//获取(modEBPricequeryLogList)销售运价日志查询列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetEBPricequeryLogListCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetEBPricequeryLogListDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetEBPricequeryLogListPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modCrmPriceCarrierList")//获取(modCrmPriceCarrierList)运价查询列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmPriceCarrierListCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmPriceCarrierListDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmPriceCarrierListPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modCrmPriceCarrierSellList")//获取(modCrmPriceCarrierSellList)运价销售报价查询列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmPriceCarrierListCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmPriceCarrierListDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCrmPriceCarrierListPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modWmsFeeLock")//获取(modWmsFeeLock)仓储费用入账和撤销
|
|
|
|
|
{
|
|
|
|
|
//权限可视范围
|
|
|
|
|
string strRange = RangeDA.GetOPERATERANGE(strUserID.Trim(), "modWmsFeeLock");//仓储费用入账和撤销
|
|
|
|
|
if (strRange.Trim().Equals("0"))//全部
|
|
|
|
|
{
|
|
|
|
|
strPortName = "all";
|
|
|
|
|
}
|
|
|
|
|
else if (strRange.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsFeeLockCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (strRange.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsFeeLockDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (strRange.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsFeeLockPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (strRange.Trim() == "4")//无
|
|
|
|
|
{
|
|
|
|
|
strPortName = "";
|
|
|
|
|
}
|
|
|
|
|
else//空
|
|
|
|
|
{
|
|
|
|
|
strPortName = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modWmsFeeRejected")//获取(modWmsFeeRejected)仓储费用取消入账
|
|
|
|
|
{
|
|
|
|
|
//权限可视范围
|
|
|
|
|
string strRange = RangeDA.GetOPERATERANGE(strUserID.Trim(), "modWmsFeeRejected");//仓储费用入账和撤销
|
|
|
|
|
if (strRange.Trim().Equals("0"))//全部
|
|
|
|
|
{
|
|
|
|
|
strPortName = "all";
|
|
|
|
|
}
|
|
|
|
|
else if (strRange.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsFeeRejectedCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (strRange.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsFeeRejectedDEPT(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (strRange.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsFeeRejectedPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (strRange.Trim() == "4")//无
|
|
|
|
|
{
|
|
|
|
|
strPortName = "";
|
|
|
|
|
}
|
|
|
|
|
else//空
|
|
|
|
|
{
|
|
|
|
|
strPortName = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modCRMClientList")//获取(modCRMClientList)潜在客户列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCRMClientListCompany(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetCRMClientListPerson(strUserID.Trim(), strGID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modWmsList")//获取(modWmsList)仓储入库列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsListCompany(strCompanyID, strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsListDEPT(strDeptName, strGID, strCompanyID, strShowName);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsListPerson(strShowName, strGID, strCompanyID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (RangeName == "modWmsOutList")//获取(modWmsOutList)仓储出库列表
|
|
|
|
|
{
|
|
|
|
|
if (RangeID.Trim() == "1")//分公司
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsOutListCompany(strCompanyID, strGID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "2")//部门
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsOutListDEPT(strDeptName, strGID, strCompanyID, strUserID);
|
|
|
|
|
}
|
|
|
|
|
else if (RangeID.Trim() == "3")//个人
|
|
|
|
|
{
|
|
|
|
|
strPortName = RangeDA.GetWmsOutListPerson(strUserID, strGID, strCompanyID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Response.Write(strPortName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|