Exemple #1
0
        private void ConfirmCart(object sender, EventArgs e, string propertyId)
        {
            BuyerValidations buyerValidationObj = new BuyerValidations();

            int BuyerID_login = int.Parse(Session["userId"].ToString());

            List <Property>  propertyList = new List <Property>();
            BuyerValidations buval        = new BuyerValidations();
            StringBuilder    sb           = new StringBuilder();

            propertyList = buyerValidationObj.DeletefromCart(int.Parse(propertyId), BuyerID_login);
            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 will be Deleted from cart...!");
                Response.Write("<script>alert('data deleted from cart :" + k.PropertyName + "');</script>");
            }

            Page.Response.Redirect(Page.Request.Url.ToString(), true);

            // string data = sb.ToString();

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

            propertyList = buval.DeletefromCart(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 will be Deleted from cart...!");
            }

            MessageBox.Show(sb.ToString());
            wp.Children.Remove(StackOFDetails);
        }