Lennie Kuah

Lennie Kuah

  • NA
  • 29
  • 0

c#.nET 2008 Transfer variable from one FORM to another FORM

Apr 5 2010 12:48 AM

Hi Friend, MQ
Need your help. Please help me sort out this puzzling problem.

The intOrderID  whose data ORDERID which I retrieve it from DataGridView1 in FRMSALESVIEW and transfer it to FORM FrmSalesMaint. but it's not working.
In VB.NET I used PROPERTY SET, GET but in C#, not sure how to code it.

FORM FrnSalesView
private int intOrderID;   
  private void btnOrderMaint_Click(object sender, EventArgs e)
        {
            FrmSalesMaint FM = new FrmSalesMaint();
            FM.PropOrderId = (intOrderID)  ;    
            FM.ShowDialog();
        } 

------------------------------------------
FORM FrmSalesMaint
private int intPOrderID;   
 public Int32  PropOrderId
            {
                get {return intPOrderID;}
                set { intPOrderID = value; }
            } 

Appreciate your help very much. Thank you for spending your precious time to help me.
 
Have a Good Day,
Cheers,
Lennie