public void GiveApprovalFor(IList<IInterNews> newsList, IUsers user)
        {
            var dbhelper = new DBHelper();
            dbhelper.BeginTransaction();

            try
            {
                newsList.ToList().ForEach(item => InterNewsDB.Instance.GiveApproval(ref dbhelper, item, user));

                dbhelper.CommitTransaction();
            }
            catch (Exception objExp)
            {
                dbhelper.RollbackTransaction();
                throw objExp;
            }
        }
Beispiel #2
0
        public void MakeActiveFor(IList<ITopNews> topNewsList, IUsers user)
        {
            var dbhelper = new DBHelper();
            dbhelper.BeginTransaction();

            try
            {
                topNewsList.ToList().ForEach(item => TopNewsDB.Instance.MakeActive(ref dbhelper, item, user));

                dbhelper.CommitTransaction();
            }
            catch (Exception objExp)
            {
                dbhelper.RollbackTransaction();
                throw objExp;
            }
        }