Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Glen Villar
  Where is Glen Villar?
 Palayan City
 Philippines
 Glen Villar
 Tags
Subject: RE: if endif,do while,scan endscan with C#
Thread ID: 394070 Message ID: 394171 # Views: 54 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: .NET
Date: Tuesday, December 31, 2013 10:10:22 AM         
   


> > Hello Experts ,
> > Thanks for C Sharp Support . Now I have just completed Insert / Update / Delete with C sharp . Now days I am playing with this :) . Once again thanks . It Could not be possible without your help and thanks to Eric for Foxite :) .
> >
> > Now Next Step I want to take . I think you came to know with the Subject of this thread .
> > Now I want comparative help for if/endif, do while , scan/endscan with C sharp.
> > Thanks In Advance .
> >
> > regards
> > Anand S. Kulkarni
> >
> > When it rains ... all Birds occupy shelter , but Eagle is the only bird with its capacity to fly over the sky to avoid rains !!!
> > https://www.facebook.com/pages/Ask-Software-Consultant-Solapur/163446803786335?ref=stream
>
> Hi Anand,
>
> I think the "While" in C# can also serve as similar to VFP's SCAN/ENDSCAN function.
> In VFP, I would mostly use scan/endscan if I want to evaluate each record and do something about it. In
> that case, with C#, the While statement is as effective as well.
>
> For instance, I'd like to fill a listview with data and change the color of an entry
> to red if it has zero cost. So my example below would do such. (pretty much like a scan/endscan) :)
>
>
>             while (DR.Read())
>                 {
>                     ListViewItem list = new ListViewItem(DR["prodcode"].ToString());
>                     list.SubItems.Add(DR["proddesc1"].ToString());
>                     list.SubItems.Add(DR["initcost"].ToString());
>                     if (list.SubItems[2].Text == "0.0000")
>                        {
>                            list.SubItems[2].ForeColor = System.Drawing.Color.Red;
>                        }
>                     lvGoods.Items.AddRange(new ListViewItem[] { list });
> 
>                 }
> 

>
>
>
>
> My blog: http://thereportersassistant.blogspot.com

Got blind because of Linq's glorious light didn't even remember this! This is absolutely the one that is closest to scan ... endscan :)



Cetin Basoz

Give some sample data in code for your question - here is the tool you need to generate the code

My Blog


MongoDb Certified Developer
MongoDb Certified DBA


Support Wikipedia

ENTIRE THREAD

if endif,do while,scan endscan with C# Posted by anand kulkarni @ 12/30/2013 1:30:32 PM
RE: if endif,do while,scan endscan with C# Posted by Stefan Wuebbe @ 12/30/2013 2:15:20 PM
RE: if endif,do while,scan endscan with C# Posted by anand kulkarni @ 12/31/2013 4:20:30 AM
RE: if endif,do while,scan endscan with C# Posted by Cetin Basoz @ 12/30/2013 6:49:50 PM
RE: if endif,do while,scan endscan with C# Posted by Gene Wirchenko @ 12/30/2013 8:11:48 PM
RE: if endif,do while,scan endscan with C# Posted by Stefan Wuebbe @ 12/30/2013 10:52:46 PM
RE: if endif,do while,scan endscan with C# Posted by Gene Wirchenko @ 12/31/2013 7:34:32 PM
RE: if endif,do while,scan endscan with C# Posted by Tony Vignone @ 12/31/2013 9:26:15 PM
RE: if endif,do while,scan endscan with C# Posted by David Mustakim @ 12/31/2013 9:39:31 PM
RE: if endif,do while,scan endscan with C# Posted by Tony Vignone @ 12/31/2013 10:33:36 PM
RE: if endif,do while,scan endscan with C# Posted by David Mustakim @ 1/2/2014 10:05:03 PM
RE: if endif,do while,scan endscan with C# Posted by Tony Vignone @ 1/2/2014 11:37:33 PM
RE: if endif,do while,scan endscan with C# Posted by Gene Wirchenko @ 12/31/2013 11:06:05 PM
RE: if endif,do while,scan endscan with C# Posted by Cetin Basoz @ 1/2/2014 1:42:16 PM
RE: if endif,do while,scan endscan with C# Posted by Gene Wirchenko @ 1/2/2014 6:49:34 PM
RE: if endif,do while,scan endscan with C# Posted by Stefan Wuebbe @ 1/1/2014 11:49:33 AM
RE: if endif,do while,scan endscan with C# Posted by Gene Wirchenko @ 1/2/2014 3:31:21 AM
RE: if endif,do while,scan endscan with C# Posted by Cetin Basoz @ 1/2/2014 1:38:05 PM
RE: if endif,do while,scan endscan with C# Posted by Gene Wirchenko @ 1/2/2014 7:04:59 PM
RE: if endif,do while,scan endscan with C# Posted by Cetin Basoz @ 1/2/2014 7:31:59 PM
RE: if endif,do while,scan endscan with C# Posted by Gene Wirchenko @ 1/3/2014 7:45:08 PM
RE: if endif,do while,scan endscan with C# Posted by Cetin Basoz @ 1/3/2014 9:38:13 PM
RE: if endif,do while,scan endscan with C# Posted by Gene Wirchenko @ 1/6/2014 8:26:53 PM
RE: if endif,do while,scan endscan with C# Posted by Glen Villar @ 12/31/2013 4:19:58 AM
RE: if endif,do while,scan endscan with C# Posted by Cetin Basoz @ 12/31/2013 10:10:22 AM
RE: if endif,do while,scan endscan with C# Posted by Glen Villar @ 12/31/2013 12:02:34 PM
RE: if endif,do while,scan endscan with C# Posted by Binod Binani @ 1/3/2014 2:34:45 PM