Ramco Ramco

Ramco Ramco

  • 1k
  • 1.6k
  • 131.1k

How to Update Record

Nov 30 2022 11:06 AM

Hi

  I have below code and i want to update the numberofshift value in records

context.Connection.Open();
context.Transaction = context.Connection.BeginTransaction();
foreach (RepeaterItem item in rptBulkData.Items)
{
    MachineShiftDetail objRecord = new MachineShiftDetail
    {

        NumberOfShift = Convert.ToInt32(txtNoOfShift.Text),

    };
    context.MachineShiftDetails...InsertOnSubmit(objRecord);
    context.SubmitChanges();
    context.Transaction.Commit();
}

Thanks


Answers (1)