You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
D7QUANTAI/DSWeb/Shipping/ExchangesUnitShare.aspx.cs

74 lines
2.4 KiB
C#

10 months ago
using System;
using DSWeb.EntityDA;
namespace DSWeb.Shipping
{
public partial class ExchangesUnitShare : System.Web.UI.Page
{
public string strUserID;//登录用户GID
RangeDA RangeDA = new RangeDA();
protected void Page_Load(object sender, EventArgs e)
{
if (Session["USERID"] != null)
{
strUserID = Session["USERID"].ToString();
}
else
{
Server.Transfer("~/Error/FriendError.aspx");
return;
}
if (Request.QueryString["id"] != null)//if (Request.QueryString["id"] != null)
{
this.hdGid.Value = Request.QueryString["id"].ToString().Trim();
}
//权限可视范围
string strV = RangeDA.GetVISIBLERANGE(strUserID.Trim(), "modExchangesUnit");
string strO = RangeDA.GetOPERATERANGE(strUserID.Trim(), "modExchangesUnit");
string alt = "";
if (strV.Trim().Equals("1"))//分公司
{
if (strO.Trim().Equals("1"))//公司
{
alt = RangeDA.GetUnitCompany(strUserID.Trim(), this.hdGid.Value.Trim());
if (alt == "")
{
getEnabled();
}
}
else if (strO.Trim().Equals("3"))//个人
{
alt = RangeDA.GetUnitPerson(strUserID.Trim(), this.hdGid.Value.Trim());
if (alt == "")
{
getEnabled();
}
}
}
else if (strV.Trim().Equals("3"))
{
if (strO.Trim().Equals("3"))//个人
{
alt = RangeDA.GetUnitPerson(strUserID.Trim(), this.hdGid.Value.Trim());
if (alt == "")
{
getEnabled();
}
}
else if (strO.Trim().Equals("4"))//无
{
getEnabled();
}
}
//
}
protected void getEnabled()
{
this.hdEnabled.Value = "0";
this.dvUserTree.Disabled = true;
this.mygrid_container_user.Disabled = true;
}
}
}