Ejemplo n.º 1
0
        public void ForeignNetwork(CustomerForeignNetworkConnection d)
        {
            long curCustID = ((DareyaIdentity)HttpContext.Current.User.Identity).CustomerID;
            if (d.CustomerID != curCustID)
                throw new HttpResponseException(System.Net.HttpStatusCode.Forbidden);

            OnboardManager mgr=new OnboardManager();

            try
            {
                bool res = mgr.LinkForeignUserToCustomer(Repo.GetWithID(curCustID), d.UserID, (Customer.ForeignUserTypes)d.Type);
                if (!res)
                    throw new HttpResponseException(System.Net.HttpStatusCode.Forbidden);
            }
            catch (Exception e)
            {
                throw new HttpResponseException(System.Net.HttpStatusCode.InternalServerError);
            }
        }
Ejemplo n.º 2
0
 public OnboardController()
 {
     _fb = new FacebookClient();
     _obm = new OnboardManager();
     _dmgr = new DareManager();
 }