View Single Post
  #1 (permalink)  
Old February 4th, 2004, 04:17 PM
savoym savoym is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: Arlington, TX, USA.
Posts: 119
Thanks: 0
Thanked 1 Time in 1 Post
Default HELP - C# newbie question on variables & propertie

I have a class that is access a webservice that contains the stored
procedure that I am accessing but I do not know how to apply variables to the elements of the dataset so that I can access it in my property.
ANY help or direction would be appreciated. Thanks.

[u]Here is my class code</u>:

public class InvoiceList
{
private int iintClientid = 0;
private int iintMonth = 0;
private int iintYear = 0;
private string istrFullName;
private DataSet idsInvoices;
private string dsReturnedData = "ClientInvoices";

// Constructor
public InvoiceList(int aintClientID, int aintMonthText, int aintYearText)
{
iintClientid = aintClientID;
iintMonth = aintMonthText;
iintYear = aintYearText;

// Connect to the PSSBilling_WebService.
PSSBilling.Service1 wsSearch = new PSSBilling.Service1();

// Define the dataset for this class.
idsInvoices = new DataSet();
idsInvoices = wsSearch.getInvoiceDataByClient( intClientid, iintMonth,
iintYear );

istrFullName =
Convert.ToString(idsInvoices.Tables["ClientInvoices"].Columns["full_name"].ColumnMapping["full_name"]);
Console.WriteLine(istrFullName);
}

[u]Here is my PROPERTY CODE</u>:

//Public Property created to EXPOSE the data elements for the INVOICE
FORM.

public string InvoiceFullName
{
get
{
return istrFullName; // THIS IS TELLING ME UNREACHABLE CODE
Console.WriteLine(istrFullName);
}
}
}
Reply With Quote