in my form1 some values are name,address,contact and one datagridview ,if the button clicked the same values in the form1 should be saved in form2 .
here is my form2 code.
cInvoice oInvoice=null;
private frmWalkInCustomer oWalkInCustomer = new frmWalkInCustomer () ;
private void btnSave_Click(object sender, EventArgs e)
{
oInvoice = new cInvoice();
oInvoice.ChairNo = oWalkInCustomer.cboChairNo.Text;
oInvoice.Date = oWalkInCustomer.dtpDate.Value.Date;
oInvoice.Name = oWalkInCustomer.txtName.Text.Trim();
oInvoice.Address = oWalkInCustomer.txtAddress.Text.Trim();
oInvoice.City = oWalkInCustomer.cboCity.Text.Trim();
oInvoice.State = oWalkInCustomer.cboState.Text.Trim();
oInvoice.MobileNo = oWalkInCustomer.txtCell.Text.Trim();
oInvoice.Amount = Convert.ToDecimal(txtAmount.Text.Trim());
oInvoice.TotDis = Convert.ToDecimal(lblDiscountRate.Text);
oInvoice.Total = Convert.ToDecimal(txtTotal.Text);
oInvoice.TotalAmount = Convert.ToDecimal(txtTotAmt.Text);
oInvoice.PayMode = cboPaymentMode.Text.Trim();
SO on..........................
...........................
}

New Topic/Question
Reply



MultiQuote








|