Example #1
0
        public static Status StatusUpdate(Status status)
        {
            status = status.Save();

            FeedService.FeedAdd("Updated", status);

            return status;
        }
Example #2
0
        public static Status StatusInsert(Status status)
        {
            status = status.Save();

            FeedService.FeedAdd("Created", status);

            return status;
        }
Example #3
0
        public static bool StatusDelete(Status status)
        {
            Status.DeleteStatus(
                new StatusCriteria
                    {
                        StatusId = status.StatusId
                    });

            FeedService.FeedAdd("Deleted", status);

            return true;
        }
Example #4
0
        public static Status StatusSave(Status status)
        {
            if (!status.IsValid)
            {
                return status;
            }

            Status result;

            if (status.IsNew)
            {
                result = StatusService.StatusInsert(status);
            }
            else
            {
                result = StatusService.StatusUpdate(status);
            }

            return result;
        }
 private void Map(FormCollection source, Status destination)
 {
     destination.Description = source["Description"];
     destination.Name = source["Name"];
     destination.IsActive = ModelHelper.ToBoolean(source["IsActive"]);
     destination.IsArchived = ModelHelper.ToBoolean(source["IsArchived"]);
     destination.IsCompleted = ModelHelper.ToBoolean(source["IsCompleted"]);
     destination.IsStarted = ModelHelper.ToBoolean(source["IsStarted"]);
     destination.Ordinal = int.Parse(source["Ordinal"]);
 }