Exemple #1
0
        public void LoadData(int taskPriorityXApplicationUserId, bool showId)
        {
            Clear();

            var data = new TaskPriorityXApplicationUserDataManager.Data();

            data.TaskPriorityXApplicationUserId = taskPriorityXApplicationUserId;
            var items = TaskPriorityXApplicationUserDataManager.GetEntityDetails(data, SessionVariables.RequestProfile);


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

            var item = items[0];

            TaskPriorityXApplicationUserId = item.TaskPriorityXApplicationUserId;
            TaskId             = item.TaskId;
            ApplicationUserId  = item.ApplicationUserId;
            TaskPriorityTypeId = item.TaskPriorityTypeId;

            if (!showId)
            {
                txtTaskPriorityXApplicationUserId.Text = item.TaskPriorityXApplicationUserId.ToString();
                oHistoryList.Setup(PrimaryEntity, taskPriorityXApplicationUserId, PrimaryEntityKey);
            }
            else
            {
                txtTaskPriorityXApplicationUserId.Text = String.Empty;
            }
        }
Exemple #2
0
        protected override void ShowData(int taskPriorityXApplicationUserId)
        {
            base.ShowData(taskPriorityXApplicationUserId);

            oDetailButtonPanel.SetId = SetId;

            Clear();

            var data = new TaskPriorityXApplicationUserDataManager.Data();

            data.TaskPriorityXApplicationUserId = taskPriorityXApplicationUserId;

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

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

                lblTaskPriorityXApplicationUserId.Text = item.TaskPriorityXApplicationUserId.ToString();
                lblTask.Text             = item.TaskId.ToString();
                lblApplicationUser.Text  = item.ApplicationUserId.ToString();
                lblTaskPriorityType.Text = item.TaskPriorityTypeId.ToString();

                oHistoryList.Setup(PrimaryEntity, taskPriorityXApplicationUserId, "TaskPriorityXApplicationUser");
            }
        }