Exemple #1
0
 public void Insert(IdeaStatusDataObject status)
 {
     using (var context = new IdeaPoolEntities())
     {
         context.IdeaStatus.Add(new IdeaStatus
         {
             Color           = status.Color,
             CreatedByUserId = status.CreatedByUserId,
             Description     = status.Description,
             Status          = status.Name,
             IsActive        = true,
             IsVisible       = true,
             Key             = status.Name.Replace(" ", "").ToUpper()
         });
         context.SaveChanges();
     }
 }
Exemple #2
0
        public void AddIdeaStatus(IdeaStatusDataObject ideaStatus)
        {
            List <int> errorcodes = new List <int>();

            if (string.IsNullOrEmpty(ideaStatus.Name) || string.IsNullOrEmpty(ideaStatus.Description))
            {
                errorcodes.Add(134);
                throw new BusinessException(errorcodes);
            }
            if (ideaStatus.Name.Length > IDEASTATUS_NAME_MAX_CHARACTER_LENGTH ||
                ideaStatus.Description.Length > IDEASTATUS_DESCRIPTION_MAX_CHARACTER_LENGTH)
            {
                errorcodes.Add(120);
                throw new BusinessException(errorcodes);
            }
            ideaStatusData.Insert(ideaStatus);
        }
Exemple #3
0
 public void AddIdeaStatus(IdeaStatusDataObject ideaStatus)
 {
     ideaStatus.CreatedByUserId = UserId;
     ProcessFactory.GetSettingsProcess().AddIdeaStatus(ideaStatus);
 }