View Code
foreach (DataListItem item in this.PendingDataList.Items){if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem){CheckBox mergerCheckBox = item.FindControl("MergerCheckBox") as CheckBox;HiddenField paymentIdHField = item.FindControl("PaymentIdHField") as HiddenField;if (mergerCheckBox.Checked){Payment payment = new Payment();payment = PaymentManager.Load(DataConvert.ToInt(paymentIdHField.Value));payment.TopUpId = topUpId;payment.UpdateBy = ContextAccessor.Session.CustomerName;payment.UpdateDate = DateTime.Now;ReturnValue returnValue = PaymentManager.Update(payment);}}}