Exemple #1
0
    private void bind()
    {
        if (!string.IsNullOrEmpty(Pageurl))
            LoginStatus1.LogoutPageUrl = Pageurl;
        MembershipUser mu = Membership.GetUser();
        BLLDJ_User blldj_user = new BLLDJ_User();
        Model.TourMembership tm = new Model.TourMembership();
        if (mu != null)
        {
            tm = new BLLMembership().GetMemberById((Guid)mu.ProviderUserKey);
            if (tm is DJ_User_TourEnterprise)
            {
                laETName.Text = (tm as DJ_User_TourEnterprise).Enterprise.Name;
                MasterCss.Href = "/theme/default/css/MasterPage.css";
            }
            if (tm is DJ_User_Gov)
            {
                laETName.Text = (tm as DJ_User_Gov).GovDpt.Name;
                MasterCss.Href = "/theme/default/css/MasterPage2.css";
            }
        }
        else
        {

        }
    }
Exemple #2
0
 protected override void OnInit(EventArgs e)
 {
     MembershipUser mu = Membership.GetUser();
     BLLDJ_User blldj_user = new BLLDJ_User();
     DJ_User_TourEnterprise DJ_User_TourEnterprise = null;
     if (mu != null)
     {
         DJ_User_TourEnterprise = new BLLMembership().GetMemberById((Guid)mu.ProviderUserKey) as DJ_User_TourEnterprise;
     }
     if (mu == null || mu.UserName == string.Empty || DJ_User_TourEnterprise == null || !(DJ_User_TourEnterprise.Enterprise is DJ_DijiesheInfo))
     {
         Response.Redirect("/LTALogin.aspx");
     }
     int perType=(int)DJ_User_TourEnterprise.PermissionType;
     if (perType == 1 || perType == 3 || perType == 5 || perType == 9 || perType == 7 || perType == 11 || perType == 13 || perType == 15)
         li_1.Visible = true;
     else
         li_1.Visible = false;
     if (perType == 2 || perType == 3 || perType == 6 || perType == 10 || perType == 7 || perType == 11 || perType == 14 || perType == 15)
     {
         li_3.Visible = true;
         li_4.Visible = true;
     }
     else
     {
         li_3.Visible = false;
         li_4.Visible = false;
     }
     if (perType == 4 || perType == 5 || perType == 6 || perType == 12 || perType == 7 || perType == 14 || perType == 13 || perType == 15)
     {
         li_6.Visible = true;
     }
     else
     {
         li_6.Visible = false;
     }
     if (perType == 8 || perType == 9 || perType == 10 || perType == 12 || perType == 11 || perType == 13 || perType == 14 || perType == 15)
     {
         li_2.Visible = true;
         li_5.Visible = true;
         li_7.Visible = true;
         li_8.Visible = true;
     }
     else
     {
         li_2.Visible = false;
         li_5.Visible = false;
         li_7.Visible = false;
         li_8.Visible = false;
     }
     CurrentDJS = DJ_User_TourEnterprise.Enterprise as DJ_DijiesheInfo;
     (Master.FindControl("changepwd") as HtmlAnchor).HRef = "/LocalTravelAgent/ChangePwd.aspx";
     (Master.FindControl("changedetails") as HtmlAnchor).HRef = "/localtravelagent/djsedit.aspx";
     base.OnInit(e);
 }
Exemple #3
0
 private void bind()
 {
     MembershipUser mu = Membership.GetUser();
     BLLDJ_User blldj_user = new BLLDJ_User();
     Model.TourMembership tm = new Model.TourMembership();
     if (mu != null)
     {
         tm = new BLLMembership().GetMemberById((Guid)mu.ProviderUserKey);
         if (tm is DJ_User_TourEnterprise)
         {
             dptid = (tm as DJ_User_TourEnterprise).Enterprise.Id.ToString();
             //laETName.Text = (tm as DJ_User_TourEnterprise).Enterprise.Name;
         }
         if (tm is DJ_User_Gov)
         {
             dptid = (tm as DJ_User_Gov).GovDpt.Id.ToString();
             int perType=(int)(tm as DJ_User_Gov).PermissionType;
             if (perType == 1 || perType == 3 || perType == 5 || perType == 7)
             {
                 li_1.Visible = true;
                 li_2.Visible = true;
             }
             else
             {
                 li_1.Visible = false;
                 li_2.Visible = false;
             }
             if (perType == 2 || perType == 3 || perType == 6 || perType == 7)
             {
                 li_3.Visible = true;
             }
             else
             {
                 li_3.Visible = false;
             }
             if (perType == 4 || perType == 5 || perType == 6 || perType == 7)
             {
                 li_4.Visible = true;
             }
             else
             {
                 li_4.Visible = false;
             }
         }
     }
     else
     {
         Response.Redirect("/Login.aspx");
     }
     (Master.FindControl("changepwd") as HtmlAnchor).HRef = "/TourManagerDpt/ChangePwd.aspx";
     (Master.FindControl("changedetails") as HtmlAnchor).HRef = "/TourManagerDpt/ChangeDetails.aspx?dptId=" + dptid;
 }
Exemple #4
0
    protected override void OnInit(EventArgs e)
    {
        MembershipUser mu = Membership.GetUser();
        BLLDJ_User blldj_user = new BLLDJ_User();
        DJ_User_TourEnterprise DJ_User_TE = null;
        if (mu != null)
        {
            DJ_User_TE = new BLLMembership().GetMemberById((Guid)mu.ProviderUserKey) as DJ_User_TourEnterprise;
        }
        if (mu == null || mu.UserName == string.Empty || DJ_User_TE == null || DJ_User_TE.Enterprise is DJ_DijiesheInfo)
        {
            Response.Redirect("/Login.aspx");
        }
        else
        {
            currentTE = DJ_User_TE.Enterprise;
        }
        int perType = (int)DJ_User_TE.PermissionType;
        if (perType == 1 || perType == 3 || perType == 5 || perType == 7)
        {
            li_1.Visible = true;
            li_3.Visible = true;
        }
        else
        {
            li_1.Visible = false;
            li_3.Visible = false;
        }
        if (perType == 2 || perType == 3 || perType == 6 || perType == 7)
        {
            li_2.Visible = true;
        }
        else
            li_2.Visible = false;
        if (perType == 4 || perType == 5 || perType == 6 || perType == 7)
        {
            li_5.Visible = true;
        }
        else
            li_5.Visible = false;

        (Master.FindControl("changepwd") as HtmlAnchor).HRef = "/TourEnterprise/TEChangePwd.aspx";
        (Master.FindControl("changedetails") as HtmlAnchor).HRef = "/TourEnterprise/TEInfo.aspx";
        base.OnInit(e);
    }