예제 #1
0
        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);
        }
예제 #2
0
 private static void Add(AssociationCountersStairCase assCounterSc)
 {
     GetContext().AssociationCountersStairCase.Add(assCounterSc);
     GetContext().SaveChanges();
 }
예제 #3
0
 private static void Remove(AssociationCountersStairCase scRemove)
 {
     GetContext().AssociationCountersStairCase.Remove(scRemove);
     GetContext().SaveChanges();
 }