Ejemplo n.º 1
0
        public void GiveApprovalFor(IList<ITopNews> topNewsList, IUsers user)
        {
            var dbhelper = new DBHelper();
            dbhelper.BeginTransaction();

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

                dbhelper.CommitTransaction();
            }
            catch (Exception objExp)
            {
                dbhelper.RollbackTransaction();
                throw objExp;
            }
        }
Ejemplo n.º 2
0
        public void MakeActiveFor(IList<IInterNews> newsList, IUsers user)
        {
            var dbhelper = new DBHelper();
            dbhelper.BeginTransaction();

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

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