예제 #1
0
        protected void enterReview(object sender, EventArgs e)
        {
            Auxiliar.getOrDeleteReview(true, TextBox1.Text, Int32.Parse(Request.QueryString["id"]));
            XmlDocument reviews = Auxiliar.getReviews(Int32.Parse(Request.QueryString["id"]));

            XmlDocument asfvafaw      = new XmlDocument();
            String      xsltFileName1 = Server.MapPath("~/XML/Reviews.xml");

            asfvafaw.Load(xsltFileName1);

            XmlDataSource3.Data  = asfvafaw.OuterXml;
            GridView1.DataSource = XmlDataSource3;
            GridView1.DataBind();

            DataSet xmlData    = new DataSet();
            var     xmlReader1 = new XmlNodeReader(reviews);

            xmlData.ReadXml(xmlReader1);

            GridView1.DataSource = xmlData;
            GridView1.DataBind();
        }
예제 #2
0
        protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            //  System.Diagnostics.Debug.WriteLine(GridView2.Rows[e.RowIndex].Cells[1].Text);
            // System.Diagnostics.Debug.WriteLine(GridView2.Rows[e.RowIndex].Cells[2].Text);

            Auxiliar.getOrDeleteReview(false, GridView2.Rows[e.RowIndex].Cells[3].Text, Int32.Parse(GridView2.Rows[e.RowIndex].Cells[2].Text));
            XmlDocument reviews = Auxiliar.getReviewsAll();

            GridView2.DataSource = null;
            GridView2.DataBind();
            XmlDataSource3.Data = "";
            XmlDataSource3.DataBind();

            DataSet xmlData    = new DataSet();
            var     xmlReader1 = new XmlNodeReader(reviews);

            xmlData.ReadXml(xmlReader1);

            XmlDataSource3.Data  = reviews.OuterXml;
            GridView2.DataSource = xmlData;
            GridView2.DataBind();
        }