Пример #1
0
    private void SetLeftPanel(string role)
    {
        string currenturl = Request.Url.ToString();
        int    startpoint = currenturl.IndexOf("App");

        if (startpoint == 0)
        {
            startpoint = currenturl.IndexOf("app");
        }
        int endpoint = currenturl.IndexOf("aspx");
        int length   = (currenturl.Length - 1) - (startpoint + 3);

        string url = currenturl.Substring(startpoint + 4, length);

        //UserService service = new UserService();
        // remove user service

        DataTable dtLinks = new DataTable();

        dtLinks.Columns.Add("Name");
        dtLinks.Columns.Add("TargetURL");


        dtLinks.Rows.Add("Home", "Dashboard.aspx");
        dtLinks.Rows.Add("Create New Campaign", "CreateNewCampaign.aspx");
        dtLinks.Rows.Add("Manage Campaign", "ViewCampaigns.aspx");
        dtLinks.Rows.Add("Create New Advocate", "AddNewAffiliate.aspx");
        dtLinks.Rows.Add("Manage Advocate", "ViewAffiliate.aspx");
        dtLinks.Rows.Add("Create Marketing Material", "MarketingMaterial.aspx");
        dtLinks.Rows.Add("Manage Marketing Material", "ViewMarketingMaterial.aspx");

        Ucleftpanel1.SetLinks(dtLinks);
    }
Пример #2
0
    private void SetLeftPanel(OrganizationRoleUserModel orgUser)
    {
        string currenturl = Request.Url.ToString();
        int    startpoint = currenturl.IndexOf("App");

        if (startpoint == 0)
        {
            startpoint = currenturl.IndexOf("app");
        }
        int endpoint = currenturl.IndexOf("aspx");
        int length   = endpoint - startpoint;

        string url = currenturl.Substring(startpoint + 4, length);


        //var listModule = null;// userdal.GetLeftPanelLinks(url, role.ToString());
        EModule[] objModule = null;

        //if (listModule != null) objModule = listModule.ToArray();

        string links = string.Empty;

        DataTable dtLinks = new DataTable();

        dtLinks.Columns.Add("Name");
        dtLinks.Columns.Add("TargetURL");

        if (objModule != null && objModule.Length > 0)
        {
            for (int icount = 0; icount < objModule.Length; icount++)
            {
                dtLinks.Rows.Add(objModule[icount].Name, this.ResolveUrl(objModule[icount].TargetURL));
            }
        }
        else
        {
            if (orgUser.CheckRole((long)Roles.SalesRep))
            {
                currenturl = this.ResolveUrl("/App/Franchisee/SalesRep/Dashboard.aspx");
            }
            else if (orgUser.CheckRole((long)Roles.FranchiseeAdmin))
            {
                currenturl = this.ResolveUrl("/App/Franchisee/Dashboard.aspx");
            }
            else if (orgUser.CheckRole((long)Roles.FranchisorAdmin))
            {
                currenturl = this.ResolveUrl("/App/Franchisor/Dashboard.aspx");
            }


            dtLinks.Rows.Add("Home", currenturl);
        }

        Ucleftpanel1.SetLinks(dtLinks);
        UcleftCalendar.SetLinks(dtLinks);
    }
Пример #3
0
    private void SetLeftPanel(string role)
    {
        string currenturl = Request.Url.ToString();
        int    startpoint = currenturl.IndexOf("App");

        if (startpoint == 0)
        {
            startpoint = currenturl.IndexOf("app");
        }
        int endpoint = currenturl.IndexOf("aspx");
        int length   = (currenturl.Length - 1) - (startpoint + 3);

        string url = currenturl.Substring(startpoint + 4, length);

        //UserService service = new UserService();
        // remove user service
        List <EModule> objModule = null; //userdal.GetLeftPanelLinks(url, role);

        //EModule[] objModule = service.GetLeftPanelLinks(url, role);

        string links = string.Empty;

        DataTable dtLinks = new DataTable();

        dtLinks.Columns.Add("Name");
        dtLinks.Columns.Add("TargetURL");

        if (objModule != null && objModule.Count > 0)
        {
            for (int icount = 0; icount < objModule.Count; icount++)
            {
                dtLinks.Rows.Add(objModule[icount].Name, this.ResolveUrl(objModule[icount].TargetURL));
                //links = links + "<a href=" + objModule[icount].TargetURL + ">" + objModule[icount].Name + "</a><br>";
            }
        }
        else
        {
            dtLinks.Rows.Add("Home", currenturl);
        }
        //dtLinks.Rows.Add("Home", "Dashboard.aspx");
        //dtLinks.Rows.Add("Create New Campaign", "CreateNewCampaign.aspx");
        //dtLinks.Rows.Add("Manage Campaign", "ViewCampaigns.aspx");
        //dtLinks.Rows.Add("Create New Advocate", "AddNewAffiliate.aspx");
        //dtLinks.Rows.Add("Manage Advocate", "ViewAffiliate.aspx");
        //dtLinks.Rows.Add("Create Marketing Material", "MarketingMaterial.aspx");
        //dtLinks.Rows.Add("Manage Marketing Material", "ViewMarketingMaterial.aspx");

        Ucleftpanel1.SetLinks(dtLinks);
    }
Пример #4
0
    private void SetLeftPanel(string role)
    {
        string currenturl = Request.Url.ToString();
        int    startpoint = currenturl.IndexOf("App");

        if (startpoint == 0)
        {
            startpoint = currenturl.IndexOf("app");
        }
        int endpoint = currenturl.IndexOf("aspx");
        int length   = (currenturl.Length - 1) - (startpoint + 3);

        string url = currenturl.Substring(startpoint + 4, length);

        //UserService service = new UserService();
        // remove user service
        List <Falcon.Entity.Other.EModule> objModule = null; // userdal.GetLeftPanelLinks(url, role);

        //string links = string.Empty;

        DataTable dtLinks = new DataTable();

        dtLinks.Columns.Add("Name");
        dtLinks.Columns.Add("TargetURL");

        if (objModule != null && objModule.Count > 0)
        {
            for (int icount = 0; icount < objModule.Count; icount++)
            {
                dtLinks.Rows.Add(objModule[icount].Name, this.ResolveUrl(objModule[icount].TargetURL));
                //links = links + "<a href=" + objModule[icount].TargetURL + ">" + objModule[icount].Name + "</a><br>";
            }
        }
        else
        {
            dtLinks.Rows.Add("Home", currenturl);
        }

        Ucleftpanel1.SetLinks(dtLinks);
    }