Exemplo n.º 1
0
        public ModelResponse ListOrgContacts(UserInfo user)
        {
            List <OrgContactVm> ds;

            try
            {
                //Authorization
                if (user == null)
                {
                    return(new ModelResponse(101));
                }
                if (string.IsNullOrWhiteSpace(user.UserId))
                {
                    return(new ModelResponse(101));
                }
                if (user.PortalUserId < 1)
                {
                    return(new ModelResponse(101));
                }

                //Load from DB
                ds = Repo.ListOrgContacts((long)user.PortalUserId);
            }
            catch (Exception ex)
            {
                return(new ModelResponse(ex));
            }

            return(new ModelResponse(0, ds));
        }