Пример #1
0
        public void LoadData(int taskPriorityTypeId, bool showId)
        {
            Clear();

            var data = new TaskPriorityTypeDataModel();

            data.TaskPriorityTypeId = taskPriorityTypeId;

            var items = TaskPriorityTypeDataManager.GetEntityDetails(data, SessionVariables.RequestProfile);

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

            var item = items[0];

            SetData(item);

            if (!showId)
            {
                SystemKeyId = item.TaskPriorityTypeId;
                Weight      = item.Weight;
                oHistoryList.Setup(PrimaryEntity, taskPriorityTypeId, PrimaryEntityKey);
            }
            else
            {
                CoreSystemKey.Text = String.Empty;
            }
        }
Пример #2
0
        protected override void ShowData(int taskPriorityTypeId)
        {
            base.ShowData(taskPriorityTypeId);

            oDetailButtonPanel.SetId = SetId;

            Clear();

            var data = new TaskPriorityTypeDataModel();

            data.TaskPriorityTypeId = taskPriorityTypeId;

            var items = TaskPriorityTypeDataManager.GetEntityDetails(data, SessionVariables.RequestProfile);

            if (items.Count == 1)
            {
                var item = items[0];

                lblWeight.Text = item.Weight.ToString();

                SetData(item);

                oHistoryList.Setup(PrimaryEntity, taskPriorityTypeId, "TaskPriorityType");
            }
        }