Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11

    Default Re: Automated Voting System in C#


    Quote Originally Posted by idwyt View Post
    try to study ang code behind TS. gi ana ra na. observe ang pattern den iloop nimo. ayos na..
    you mean this one?...well technically yes i could follow the pattern but the prob is like i said i created the form as a basis lang of what i want it to look like...so theres really no code behind it...hehehe

  2. #12

    Default Re: Automated Voting System in C#

    for me I think, its better to create a custom control, which will render the candidate groups.

    the control should have a DataSource like property, where you can assign the the list of candidates or the like.

    adding controls to containers and other controls is simple just like what silentkill posted.

    someObject.Controls.Add(<control here>);

    but I'm sure that would not be enough to simplify your solution.

  3. #13

    Default Re: Automated Voting System in C#

    hmm decided to use listview na lang para mas dali...hehehe....follow up question how do you add image as a subitem of an item in listview?

  4. #14

    Default Re: Automated Voting System in C#

    Quote Originally Posted by Deathnote View Post
    hmm decided to use listview na lang para mas dali...hehehe....follow up question how do you add image as a subitem of an item in listview?
    ^^
    ItemTemplate

    If I were you, I would make a web user control for this with properties (Image, Name, ID etc) and 1 event say delegate YouClickedMe(ID as Integer). Query the database normally and do a loop, instantiate your user control for each pass sa loop.

    MyUserControl X = CType(this.LoadControl("VirtualPathOfYourControl") , ControlType)
    X.Image = FromDatabase
    X.Name = FromDatabase
    X.ID = FromDatabase

    Add the event handler sa imong delegate/event. I forgot the syntax in C# pero sa VB it is AddHandler X.YouClickedMe, AddressOf("EventHandler")

    Add your instantiated user control to whatever is your control container, a repeater is good enough.
    Last edited by Rainerius; 09-09-2011 at 12:08 AM.

  5.    Advertisement

Page 2 of 2 FirstFirst 12

Similar Threads

 
  1. constantine was voted out in AI...
    By robearthFX in forum Music & Radio
    Replies: 16
    Last Post: 10-25-2014, 01:11 PM
  2. MGA BRO: HELP ABOUT VIDEO RENTAL SYSTEM IN VB LANGUAGE
    By peewee711 in forum Programming
    Replies: 12
    Last Post: 09-14-2010, 03:51 AM
  3. Payroll System in VB 6.0
    By uzumaki in forum Programming
    Replies: 33
    Last Post: 07-02-2010, 01:42 PM
  4. Change in voting system
    By homeryap in forum Politics & Current Events
    Replies: 2
    Last Post: 10-26-2008, 12:11 AM
  5. Replies: 1
    Last Post: 12-14-2006, 12:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top