Hi,
please help to correct code when update a record it shows error.
code and error image attached.
Tbl_PartialPayments p = new Tbl_PartialPayments();
p.SerialID = Convert.ToInt32(txtSerialID.Text);
p.CustomerID = Convert.ToInt32(DDLCustName.SelectedValue);
p.EventHeaderID = Convert.ToInt32(MCCBEvent.SelectedValue);
p.EntryDate = txtEntryDate.Value;
p.TotalAmount = Convert.ToInt32(txtTotalAmt.Text);
p.PaidAmount = Convert.ToInt32(txtPaidAmt.Text);
p.Remarks = txtRemarks.Text;
p.LastUpdateBy = Login.GetLoginID;
p.LastUpdateDate = DateTime.Now;
db.Entry(p).State = EntityState.Modified;
db.SaveChanges();
Clear();
MessageBox.Show("Record Updated Successfully...", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);