public static FormFieldTable DeleteRow(this FormFieldTable formField, int rowId) { formField.Value.Add(new TableRow { RowId = rowId, Delete = true }); return(formField); }
public static FormFieldTable DeleteRows(this FormFieldTable formField, IEnumerable <int> rowIds) { formField.Value.AddRange(rowIds.Select(id => new TableRow { RowId = id, Delete = true })); return(formField); }
public static FormFieldTable DeleteRows(this FormFieldTable formField, IEnumerable <TableRow> rows) { foreach (var row in rows) { row.Delete = true; formField.Value.Add(row); } return(formField); }
public static FormFieldTable WithValue(this FormFieldTable formField, IEnumerable <TableRow> rows) { formField.Value = rows?.ToList() ?? new List <TableRow>(); return(formField); }
public static FormFieldTable AddRows(this FormFieldTable formField, IEnumerable <TableRow> rows) { formField.Value.AddRange(rows); return(formField); }
public static FormFieldTable AddRow(this FormFieldTable formField, int rowId, IEnumerable <FormField> cells) { formField.Value.Add(new TableRow(rowId, cells)); return(formField); }
public static FormFieldTable AddRow(this FormFieldTable formField, TableRow row) { formField.Value.Add(row); return(formField); }
public static FormFieldTable DeleteRow(this FormFieldTable formField, TableRow row) { row.Delete = true; formField.Value.Add(row); return(formField); }