예제 #1
0
        /// <summary>
        /// Method to Delete UserRights
        /// </summary>
        /// <param name="argEn">UserRights Entity is an Input.UserGroup as Input Property.</param>
        /// <returns>Returns Boolean</returns>
        public bool Delete(UserRightsEn argEn)
        {
            bool flag;

            using (TransactionScope ts = new TransactionScope())
            {
                try
                {
                    UserRightsDAL loDs = new UserRightsDAL();
                    flag = loDs.Delete(argEn);
                    ts.Complete();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            return(flag);
        }
예제 #2
0
        public static bool Save(UserRightsList objList)
        {
            bool flgSave;

            try
            {
                using (TransactionScope objTScope = new TransactionScope(TransactionScopeOption.RequiresNew))
                {
                    UserRightsDAL.Delete(objList[0].UserID);
                    foreach (UserRights objRight in objList)
                    {
                        UserRightsDAL.Save(objRight);
                    }
                    flgSave = true;
                    objTScope.Complete();
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(flgSave);
        }
예제 #3
0
 public bool DeleteUserRights(UserRights item)
 {
     return(userrightsDAL.Delete(item));
 }