public ActionResult ContactBroker(string listingId, string Message, string BrokerId)
        {
            var    Broker_ID    = Convert.ToString(CipherTool.DecryptString(BrokerId));
            var    HashCriteria = new Hashtable();
            string actualCriteria;
            var    serialization      = new Serialization();
            var    investorListingsBA = new InvestorListings();
            long   listing_ID         = 0;

            if (listingId != "0")
            {
                listing_ID = Convert.ToInt64(CipherTool.DecryptString(listingId));
            }
            HashCriteria.Add("ID", listing_ID);
            HashCriteria.Add("Message", Message);
            HashCriteria.Add("Subject", "Contact Broker Request ");
            HashCriteria.Add("UserID", userID);
            HashCriteria.Add("IsContactToBroker", true);
            HashCriteria.Add("ReceiverId", Broker_ID);
            actualCriteria = serialization.SerializeBinary((object)HashCriteria);
            var resultComment = investorListingsBA.SendMessageToBroker(actualCriteria);
            var CommentID     = Convert.ToInt64(serialization.DeSerializeBinary(Convert.ToString(resultComment)));
            var result        = SendContactRequestEmail(CommentID, true);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public ActionResult ScheduleConsultationForPublicUser(string Email, string Name, string Phone, string Message)
        {
            var    investorListingsBA = new InvestorListings();
            var    investorlisting    = new InvestorListingsController();
            var    serialization      = new Serialization();
            var    HashCriteria       = new Hashtable();
            string actualCriteria;

            HashCriteria.Add("ID", null);
            HashCriteria.Add("Message", Message);
            HashCriteria.Add("Subject", "Schedule Consultation Request ");
            HashCriteria.Add("UserID", userID);
            HashCriteria.Add("Name", Name);
            HashCriteria.Add("PhoneNumber", Phone);
            HashCriteria.Add("EmailAddress", Email);
            actualCriteria = serialization.SerializeBinary((object)HashCriteria);
            var resultMessage = investorListingsBA.SendMessageToBroker(actualCriteria);
            var CommentID     = Convert.ToInt64(serialization.DeSerializeBinary(Convert.ToString(resultMessage)));
            var result        = investorlisting.SendContactRequestEmail(CommentID, false);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }