Exemple #1
0
        public void LoadData(int projectTimeLineId, bool showId)
        {
            // clear UI

            Clear();

            var dataQuery = new ProjectTimeLineDataModel();

            dataQuery.ProjectTimeLineId = projectTimeLineId;

            var items = ProjectTimeLineDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile);

            if (items.Count != 1)
            {
                return;
            }

            var item = items[0];

            ProjectTimeLineId = item.ProjectTimeLineId;
            ProjectId         = item.ProjectId;
            StartDate         = item.StartDate;
            EndDate           = item.EndDate;

            if (!showId)
            {
                txtProjectTimeLineId.Text = item.ProjectTimeLineId.ToString();

                // only show Audit History in case of Update page, not for Clone.
                oHistoryList.Setup((int)Framework.Components.DataAccess.SystemEntity.ProjectTimeLine, projectTimeLineId, "ProjectTimeLine");
            }
            else
            {
                txtProjectTimeLineId.Text = String.Empty;
            }

            oUpdateInfo.LoadText(item.UpdatedDate, item.UpdatedBy, item.LastAction);
        }