Exemplo n.º 1
0
        public ResultDto ChangeStatus(int id)
        {
            ResultDto resultDto  = new ResultDto();
            string    objectName = "Roles";
            string    StatusCode = string.Empty;

            try
            {
                int effectedCount = _roleDal.ChangeStatus(ref id, ref StatusCode);
                resultDto.ObjectId = id;
                if (resultDto.ObjectId > 0)
                {
                    resultDto.Message = string.Format("{0}:details Deleted successfully", objectName);
                }
                else
                {
                    resultDto.Message = string.Format("Error occured while deleting {0} Details", objectName);
                }
            }
            catch (Exception)
            {
                resultDto.Message  = string.Format("service layer error occured while deleting{0} details", objectName);
                resultDto.ObjectId = -98;
            }
            return(resultDto);
        }