Help please: another beginner's question
I am getting the following error from my FORM code:
'Cannot implicitly convert type 'int' to 'string' which refers to the following line of code in my FORM code:
lblCount.Text = il.load( Convert.ToInt16(lstringClientID), lintMonthText, Convert.ToInt16( lstringYearText ));
My FORM code:
private void btnInvoiceSearch_Click(object sender, System.EventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
// Identify the variables from the form elements to pass to the stored procedure in the PSSBilling_WebService
string lstringClientID = txtClientID.SelectedText;
int lintMonthText = lstMonthText.SelectedIndex + 1;
string lstringYearText = lstYearText.SelectedItem.ToString();
InvoiceList il = new InvoiceList();
lblCount.Text = il.load( Convert.ToInt16(lstringClientID), lintMonthText, Convert.ToInt16( lstringYearText ));
}
My LOAD code from another class within my same project:
public int load (int astringClientID, int aintMonthText, int astringYearText)
{
iintClientid = astringClientID;
iintMonth = aintMonthText;
iintYear = astringYearText;
// Connect to the PSSBilling_WebService
PSSBilling.Service1 wsSearch = new PSSBilling.Service1();
idsInvoices = new DataSet();
idsInvoices = wsSearch.getInvoiceDataByClient( astringClientID, aintMonthText, astringYearText );
return idsInvoices.Tables[dsReturnedData].Rows.Count;
}
|