Hi Friends

I need your help again.
Due to technical Logical Specfication by System Analyst request to create 2 FORMs, FRMPayRoll and FRMPopUpEmployeeRef.

On FRMPayRoll, click on the Button to Load FRMPopUpEmployeeRef. Apparently, this FORM FRMPopUpEmployeeRef is being used by many FORMS within the Payroll Application. All the FORMs retreive the same data from it.


On Loaded FORM FRMPopUpEmployeeRef, Exit the FORM after selected the specific employee from the datagridview1
and transfer the employee name, EmployeeID , Wages and BankAccount back to the calling FORM FRMPayRoll.

-------------------------------------------------------------------------------------------------------------
Here are the error messages :


Error 1 Cannot convert method group 'PropEmployeeId' to non-delegate type 'string'. Did you intend to invoke the method?

Error 2 Cannot convert method group 'PropEmployeeName' to non-delegate type 'string'. Did you intend to invoke the method?

Error 3 Cannot convert method group 'PropWages' to non-delegate type 'string'. Did you intend to invoke the method?

Error 4 Cannot convert method group 'PropBankAccount' to non-delegate type 'string'. Did you intend to invoke the method?
------------------------------------------------------------------------------------------------

FORM FRMPayRoll Coding

private void btnEmployeeRef_Click(object sender, EventArgs e)
{

FRMPopUpEmployeeRef FM = new FRMPopUpEmployeeRef();


FM.ShowDialog();

Boolean bolFlag = FM.PropSelect();

if (bolFlag == true)
{
this.txtEmployeeID.Text = convert.tostring(FM.PropEmployeeID);
this.txtEmployeeName.Text = convert.tostring (FM.PropEmployeeName);
this.txtEmployeeWages.Text = Convert.ToString(FM.PropWages);
this.txtEmployeeBankAcct.Text = Convert.ToString(FM.PropBankAccount);
}

}

================================

LOADED POP UP FORM FRMPopUpEmployeeRef Coding


// common variables on FRMPopUpEmployeeRef
private Boolean bolSelected; // confirm selection
private int intEmployeeID; // Employee ID
private string strEmployeeName; // employee name
private int intWages ; // employee wages
private string strBankAccount; // employee Bank Account


private void datagridviewProduct_Click(Object sender, DataGridViewCellEventArgs e)
// retrive all column from selected row or cells in datagridview
{
int intRowIndex = this.dataGridViewProduct.CurrentRow.Index;

if (intRowIndex != -1)
{
intEmployeeID = (int) this.dataGridViewEmployee.CurrentRow.Cells[0].Value;
strEmployeeName = this.dataGridViewEmployee.CurrentRow.Cells[1].Value.ToString();
intWages = (int) this.dataGridViewEmployee.CurrentRow.Cells[2].Value;
strBankAccount = this.dataGridViewEmployee.CurrentRow.Cells[3].Value.tostring();

//exit by default
bolSelected = true;
this.Close();
}
}


#region " --- Transfer Selected data back to Calling FORM --- "

public bool PropSelect()
{ return bolSelected; }

public int PropEmployeeID()
{ return intEmployeeID; }

public string PropEmployeeName()
{ return strEmployeeName; }

public int PropWages()
{ return intWages; }

public string PropBankAccount()
{ return strBankAccount; }


#endregion