Jump to content

Recommended Posts

Posted

bhayya konchem help kaavali 

yevaru aina .net vallu available vunnara ? or andaru holidays aa ??

Posted
oka table nunchi query chesthe ee values vastunnayi.
<IDList>
<Id>1211740172</Id>
<createDate>2014-12-18T13:38:48</createDate>
<dayOfWeek>2</dayOfWeek>
<endTime>2014 -12-12 10:00 am</endTime>
<startTime>2014 -12-12 08:00 am</startTime>
</IDList>
<IDList>
<Id>1211740182</Id>
<createDate>2014-12-18T13:38:48</createDate>
<dayOfWeek>2</dayOfWeek>
<endTime>2014 -12-12 03:00 pm</endTime>
<startTime>2014 -12-12 05:00 pm</startTime>
</IDList>
Posted
Now the requirement is to add a new element to the existing ones.(highlighted)
example dayOfWeek okkasare vundi ante then sequence value should be 1, if dayOfWeek more than once vunte the sequence value should increment based on the start time anta
 
<IDList>
<Id>1211740172</Id>
<createDate>2014-12-18T13:38:48</createDate>
<dayOfWeek>2</dayOfWeek>
<endTime>2014 -12-12 10:00 am</endTime>
<startTime>2014 -12-12 08:00 am</startTime>
<sequence>1</sequence>
</IDList>
<IDList>
<Id>1211740182</Id>
<createDate>2014-12-18T13:38:48</createDate>
<dayOfWeek>2</dayOfWeek>
<endTime>2014 -12-12 03:00 pm</endTime>
<startTime>2014 -12-12 05:00 pm</startTime>
<sequence>2</sequence>
</IDList>
 
Posted

 

oka table nunchi query chesthe ee values vastunnayi.
<IDList>
<Id>1211740172</Id>
<createDate>2014-12-18T13:38:48</createDate>
<dayOfWeek>2</dayOfWeek>
<endTime>2014 -12-12 10:00 am</endTime>
<startTime>2014 -12-12 08:00 am</startTime>
</IDList>
<IDList>
<Id>1211740182</Id>
<createDate>2014-12-18T13:38:48</createDate>
<dayOfWeek>2</dayOfWeek>
<endTime>2014 -12-12 03:00 pm</endTime>
<startTime>2014 -12-12 05:00 pm</startTime>
</IDList>

 

 

you are getting List<IDList> in xml format.. so ??

Posted

ltt

Posted

LTT......but XML vesi .NET adugutunnav endi bhayya  sCo_^Y  sCo_^Y

Posted

you are getting List<IDList> in xml format.. so ??

 

 

ltt

already vachina list ki oka element add cheyyali and the value of that should increment if paina example lo dayOfWeek ane element is more than once

Posted

LTT......but XML vesi .NET adugutunnav endi bhayya  sCo_^Y  sCo_^Y

database nunchi oka list object loki vastundi bhayya 

so aa list ikkada vesa

aa list ni C# lo update cheyyali 

adi yela ani  sCo_^Y  

Posted

if its a list enumertae thru that and use add method to add...for that dayofweek condition u can apply any logic inside the loop before adding

Posted

so adi yela cheyyali ani ardam kaavadam ledu 

 

XElement   and XDocument classes unnayi  .. dantlo you can add node.. vaadi gurinchi chaduvu.. will be easy..  

 

int sequenceCounter = 0 define chesi  foreach ( descendent node    )    add that node if dayoftheweek exists and increment counter

Posted

already vachina list ki oka element add cheyyali and the value of that should increment if paina example lo dayOfWeek ane element is more than once

 

lots of ways

 

 

as of now,

these 2 ways striked

 

1)better to get whole XML as string .... and ....do  XML DeSerialization first  and then Do XML Serialization adding your requirement

(or)

2) Manually Read XML either by XMLDocument class or some other and then add the node as per the requirement 

Posted

XElement   and XDocument classes unnayi  .. dantlo you can add node.. vaadi gurinchi chaduvu.. will be easy..  

 

int sequenceCounter = 0 define chesi  foreach ( descendent node    )    add that node if dayoftheweek exists and increment counter

bhayya my bad 

nenu example ga ichhindi is from a list 

so list ni edit cheyyali

Posted

if its a list enumertae thru that and use add method to add...for that dayofweek condition u can apply any logic inside the loop before adding

inka konchem elaborate chestava bhayya 

×
×
  • Create New...