public string ConvertCircleXML()
{
StringBuilder sb = new StringBuilder();
sb.Append("");
sb.Append("<Circle>");
foreach (GridViewRow Item in GrdCircle.Rows)
{
CheckBox GrdChkBox = (CheckBox)(Item.FindControl("ChkCircle"));
if (GrdChkBox.Checked == true)
{
sb.Append("<test>");
string CircleId = GrdCircle.DataKeys[Item.RowIndex].Values[0].ToString();
string CorpBillingId = GrdCircle.DataKeys[Item.RowIndex].Values[1].ToString();
TextBox TxtGrdBillingName = (TextBox)(Item.FindControl("TxtBillingName1"));
TextBox TxtGrdBillingAmount = (TextBox)(Item.FindControl("TxtBillingAmount1"));
sb.Append("<CircleId>" + CircleId + "</CircleId><CorpBillingId>" + CorpBillingId + "</CorpBillingId><TxtGrdBillingName>" + TxtGrdBillingName.Text + "</TxtGrdBillingName><TxtGrdBillingAmount>" + TxtGrdBillingAmount.Text + " </TxtGrdBillingAmount><UserId>" + Session["UserId"].ToString() + "</UserId>");
sb.Append("</test>");
}
}
sb.Append("</Circle>");
return sb.ToString();
}
{
StringBuilder sb = new StringBuilder();
sb.Append("");
sb.Append("<Circle>");
foreach (GridViewRow Item in GrdCircle.Rows)
{
CheckBox GrdChkBox = (CheckBox)(Item.FindControl("ChkCircle"));
if (GrdChkBox.Checked == true)
{
sb.Append("<test>");
string CircleId = GrdCircle.DataKeys[Item.RowIndex].Values[0].ToString();
string CorpBillingId = GrdCircle.DataKeys[Item.RowIndex].Values[1].ToString();
TextBox TxtGrdBillingName = (TextBox)(Item.FindControl("TxtBillingName1"));
TextBox TxtGrdBillingAmount = (TextBox)(Item.FindControl("TxtBillingAmount1"));
sb.Append("<CircleId>" + CircleId + "</CircleId><CorpBillingId>" + CorpBillingId + "</CorpBillingId><TxtGrdBillingName>" + TxtGrdBillingName.Text + "</TxtGrdBillingName><TxtGrdBillingAmount>" + TxtGrdBillingAmount.Text + " </TxtGrdBillingAmount><UserId>" + Session["UserId"].ToString() + "</UserId>");
sb.Append("</test>");
}
}
sb.Append("</Circle>");
return sb.ToString();
}
No comments:
Post a Comment