Example #1
0
    public string[] GetSalesRepForFranchisee_nonSSL(string prefixText, int count, string contextKey)
    {
        List <string> items           = new List <string>();
        int           intFranchiseeID = 0;

        if (contextKey != null && contextKey != "")
        {
            intFranchiseeID = Convert.ToInt32(contextKey);
        }

        //HealthYes.Web.UI.FranchiseeFranchiseeUserService.FranchiseeFranchiseeUserService objService = new HealthYes.Web.UI.FranchiseeFranchiseeUserService.FranchiseeFranchiseeUserService();
        // remove services references
        FranchiseeDAL franchiseeDAL = new FranchiseeDAL();

        //HealthYes.Web.UI.FranchiseeFranchiseeUserService.EUser[] objEUser = objService.GetSalesRepForFranchisee(prefixText, intFranchiseeID, true, 0, true);
        List <Falcon.Entity.Other.EUser> objEUser = franchiseeDAL.GetSalesRepForFranchisee(prefixText, intFranchiseeID, 0);

        try
        {
            string struser = string.Empty;


            foreach (Falcon.Entity.Other.EUser objUser in objEUser)
            {
                struser = objUser.FirstName + " [" + objUser.UserID.ToString() + "]";
                items.Add(struser);
            }
        }
        catch (Exception ex)
        {
            items.Add(ex.Message);
        }
        return(items.ToArray());
    }
Example #2
0
    public string[] GetSalesRepForFranchisee(string prefixText, int count, string contextKey)
    {
        List <string> items           = new List <string>();
        long          intFranchiseeID = 0;

        if (contextKey != null && contextKey != "")
        {
            intFranchiseeID = Convert.ToInt64(contextKey);
        }

        //HealthYes.Web.UI.FranchiseeFranchiseeUserService.FranchiseeFranchiseeUserService objService = new HealthYes.Web.UI.FranchiseeFranchiseeUserService.FranchiseeFranchiseeUserService();
        // remove services references
        FranchiseeDAL franchiseeDAL = new FranchiseeDAL();

        //HealthYes.Web.UI.FranchiseeFranchiseeUserService.EUser[] objEUser = objService.GetSalesRepForFranchisee(prefixText, intFranchiseeID, true, 0, true);
        List <Falcon.Entity.Other.EUser> objEUser = franchiseeDAL.GetSalesRepForFranchisee(prefixText, intFranchiseeID, 0);

        try
        {
            string struser = string.Empty;
            IOrganizationRoleUserRepository orgRoleUserRepository = new OrganizationRoleUserRepository();

            foreach (Falcon.Entity.Other.EUser objUser in objEUser)
            {
                var orgRoleUser = orgRoleUserRepository.GetOrganizationRoleUser(objUser.UserID, Falcon.App.Core.Enum.Roles.SalesRep, intFranchiseeID);
                struser = objUser.FirstName + " [" + orgRoleUser.Id.ToString() + "]";
                items.Add(struser);
            }
        }
        catch (Exception ex)
        {
            items.Add(ex.Message);
        }
        return(items.ToArray());
    }