コード例 #1
0
        //DeleteBySubjectId
        public static void DeleteItemsSubjectBySubjectId(int subjectId)
        {
            List <ItemsSubject> lst = new List <ItemsSubject>(ItemsSubjectDL.GetAllItemsSubject());

            if (lst != null && lst.Count != 0)
            {
                ItemsSubjectDL.DeleteById(lst.Where(it => it.SubjectId.Equals(subjectId)).FirstOrDefault());
            }
        }
コード例 #2
0
        //DeleteByItemId
        public static void DeleteItemsSubjectByItemId(int ItemId)
        {
            List <ItemsSubject> lst = new List <ItemsSubject>(ItemsSubjectDL.GetAllItemsSubject());

            if (lst.Count > 0)
            {
                ItemsSubjectDL.DeleteById(lst.Where(it => it.ItemId.Equals(ItemId)).FirstOrDefault());
            }
        }