private static List <AssociationCountersStairCase> GetStairCases(CheckBoxList chbAssociationStairs) { var result = new List <AssociationCountersStairCase>(); foreach (ListItem item in chbAssociationStairs.Items) { if (item.Selected) { var newCounte = new AssociationCountersStairCase { Id_StairCase = item.Value.ToNullableInt() }; result.Add(newCounte); } } return(result); }
private static void Add(AssociationCountersStairCase assCounterSc) { GetContext().AssociationCountersStairCase.Add(assCounterSc); GetContext().SaveChanges(); }
private static void Remove(AssociationCountersStairCase scRemove) { GetContext().AssociationCountersStairCase.Remove(scRemove); GetContext().SaveChanges(); }