Esempio n. 1
0
    public string[] GetEmployeeForFranchisor(string prefixText, int count, string contextKey)
    {
        //GetEmployeeForFranchisor
        List <string> items = new List <string>();
        //HealthYes.Web.UI.FranchiseeFranchiseeUserService.FranchiseeFranchiseeUserService objService = new HealthYes.Web.UI.FranchiseeFranchiseeUserService.FranchiseeFranchiseeUserService();
        // remove services references
        FranchiseeDAL franchiseeDAL = new FranchiseeDAL();

        //HealthYes.Web.UI.FranchiseeFranchiseeUserService.EFranchiseeFranchiseeUser[] objFFUser = objService.GetEmployeeForFranchisor(prefixText, Convert.ToInt32(contextKey), true);
        List <Falcon.Entity.Franchisee.EFranchiseeFranchiseeUser> objFFUser = franchiseeDAL.GetEmployeeForFranchisor(prefixText, Convert.ToInt32(contextKey), 4);

        try
        {
            string struser  = string.Empty;
            string strshell = string.Empty;
            string strrole  = string.Empty;

            foreach (Falcon.Entity.Franchisee.EFranchiseeFranchiseeUser objUser in objFFUser)
            {
                struser  = objUser.FranchiseeUser.User.FirstName + " " + objUser.FranchiseeUser.User.LastName + "[" + objUser.FranchiseeUser.User.UserID + "]";
                strrole  = objUser.RoleType + "[" + objUser.RoleID + "]";
                strshell = objUser.Franchisee.Name + "[" + objUser.Franchisee.FranchiseeID + "]";



                items.Add(struser + " as " + strrole + " in " + strshell);
            }
        }
        catch (Exception ex)
        {
            items.Add(ex.Message);
        }

        return(items.ToArray());
    }
Esempio n. 2
0
    public List <string> GetEmployeeForFranchisorByPrefixTextAndContextKey(string prefixText, string contextKey)
    {
        List <string> items         = new List <string>();
        FranchiseeDAL franchiseeDAL = new FranchiseeDAL();

        List <Falcon.Entity.Franchisee.EFranchiseeFranchiseeUser> objFFUser = franchiseeDAL.GetEmployeeForFranchisor(prefixText, Convert.ToInt32(contextKey), 4);

        try
        {
            string struser  = string.Empty;
            string strshell = string.Empty;
            string strrole  = string.Empty;

            foreach (Falcon.Entity.Franchisee.EFranchiseeFranchiseeUser objUser in objFFUser)
            {
                struser  = objUser.FranchiseeUser.User.FirstName + " " + objUser.FranchiseeUser.User.LastName + "[" + objUser.FranchiseeUser.User.UserID + "]";
                strrole  = objUser.RoleType + "[" + objUser.RoleID + "]";
                strshell = objUser.Franchisee.Name + "[" + objUser.Franchisee.FranchiseeID + "]";



                items.Add(struser + " as " + strrole + " in " + strshell);
            }
        }
        catch (Exception ex)
        {
            items.Add(ex.Message);
        }

        return(items);
    }
Esempio n. 3
0
    public List <string> GetSalesRepForFranchisorByPrefixText(string prefixText)
    {
        FranchiseeDAL franchiseeDal = new FranchiseeDAL();

        return(franchiseeDal.GetEmployeeForFranchisor(prefixText, 0, 5)
               .Select <EFranchiseeFranchiseeUser, string>(franchiseeUser =>
        {
            string user = franchiseeUser.FranchiseeUser.User.FirstName + " " + franchiseeUser.FranchiseeUser.User.LastName + "[" + franchiseeUser.FranchiseeFranchiseeUserID.ToString() + "]";
            string role = franchiseeUser.RoleType;
            string shell = franchiseeUser.Franchisee.Name + "[" + franchiseeUser.Franchisee.FranchiseeID + "]";

            return user + " as " + role + " in " + shell;
        }).ToList <string>());
    }