Esempio n. 1
0
        private void ConfirmCart(object sender, EventArgs e, string propertyId)
        {
            BuyerValidations buyerValidationObj = new BuyerValidations();
            List <Property>  propertyList       = new List <Property>();
            BuyerValidations buval = new BuyerValidations();
            StringBuilder    sb    = new StringBuilder();
            int BuyerID_login      = int.Parse(Session["userId"].ToString());

            propertyList = buyerValidationObj.AddToCart(int.Parse(propertyId), BuyerID_login);
            foreach (var k in propertyList)
            {
                Response.Write("<script>alert('" + k.PropertyName + "<br/>This property added to cart :');</script>");
                sb.Append("Name: " + k.PropertyName + "\n");
                sb.Append("Type: " + k.PropertyType + "\n");
                sb.Append("Option :" + k.PropertyOption + "\n");
                sb.Append("Description :" + k.Description + "\n");
                sb.Append("Address :" + k.Address + "\n");
                sb.Append("Price: " + k.PriceRange + "\n");
                sb.Append("Intial Deposit: " + k.InitialDeposit + "\n");
                sb.Append("LandMark:" + k.Landmark + "\n");
                sb.Append("The Above Property is Added to cart successfully...");
            }
            // string data = sb.ToString();

            // Response.Write("<script>alert('data added to cart :" + data + "');</script>");
        }
        void ConfirmCart(object sender, EventArgs e, int PropID)
        {
            List <Property>  propertyList = new List <Property>();
            BuyerValidations buval        = new BuyerValidations();
            StringBuilder    sb           = new StringBuilder();

            buval.GetBuyerId(buyerId);
            propertyList = buval.AddToCart(PropID);
            foreach (var k in propertyList)
            {
                sb.Append("Name: " + k.PropertyName + "\n");
                sb.Append("Type: " + k.PropertyType + "\n");
                sb.Append("Option :" + k.PropertyOption + "\n");
                sb.Append("Description :" + k.Description + "\n");
                sb.Append("Address :" + k.Address + "\n");
                sb.Append("Price: " + k.PriceRange + "\n");
                sb.Append("Intial Deposit: " + k.InitialDeposit + "\n");
                sb.Append("LandMark:" + k.Landmark + "\n");
                sb.Append("The Above Property is Added to cart successfully...");
            }

            MessageBox.Show(sb.ToString());
        }