FetchStatus() статический приватный Метод

static private FetchStatus ( StatusData data ) : Status
data Epiworx.Data.StatusData
Результат Status
Пример #1
0
        public static Status StatusFetch(int statusId)
        {
            var result = Status.FetchStatus(
                new StatusDataCriteria
            {
                StatusId = statusId
            });

            result.Auditor = new StatusAuditor(result.Clone());

            return(result);
        }
Пример #2
0
        public static string FetchStatusName(int statusId)
        {
            if (statusId == 0)
            {
                return(string.Empty);
            }

            var status = Status.FetchStatus(new StatusCriteria {
                StatusId = statusId
            });

            return(status.Name);
        }
Пример #3
0
        public static IStatus FetchStatus(int statusId)
        {
            if (statusId == 0)
            {
                return(null);
            }

            var status = Status.FetchStatus(new StatusCriteria {
                StatusId = statusId
            });

            return(status);
        }
Пример #4
0
        private void OnStatusIdChanged()
        {
            if (this.StatusId == 0)
            {
                this.IsCompleted   = false;
                this.StatusName    = string.Empty;
                this.StartDate     = DateTime.MaxValue.Date;
                this.CompletedDate = DateTime.MaxValue.Date;

                return;
            }

            var status = Status.FetchStatus(new StatusDataCriteria {
                StatusId = this.StatusId
            });

            this.StatusName = status.Name;

            if (status.IsStarted)
            {
                this.CompletedDate = DateTime.MaxValue.Date;
                if (this.StartDate == DateTime.MaxValue.Date)
                {
                    this.StartDate = DateTime.Now.Date;
                }
            }
            else if (status.IsCompleted)
            {
                this.CompletedDate = DateTime.MaxValue.Date;
            }
            else
            {
                this.StartDate     = DateTime.MaxValue.Date;
                this.CompletedDate = DateTime.MaxValue.Date;
            }
        }