Esempio n. 1
0
        public void LoadData(int taskRiskRewardRankingXPersonId, bool showId)
        {
            Clear();

            var data = new TaskRiskRewardRankingXPersonDataManager.Data();

            data.TaskRiskRewardRankingXPersonId = taskRiskRewardRankingXPersonId;
            var items = TaskRiskRewardRankingXPersonDataManager.GetEntityDetails(data, SessionVariables.RequestProfile);


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

            var item = items[0];

            TaskRiskRewardRankingXPersonId = item.TaskRiskRewardRankingXPersonId;
            TaskId   = item.TaskId;
            RiskId   = item.RiskId;
            RewardId = item.RewardId;
            PersonId = item.PersonId;

            if (!showId)
            {
                txtTaskRiskRewardRankingXPersonId.Text = item.TaskRiskRewardRankingXPersonId.ToString();
                oHistoryList.Setup(PrimaryEntity, taskRiskRewardRankingXPersonId, PrimaryEntityKey);
            }
            else
            {
                txtTaskRiskRewardRankingXPersonId.Text = String.Empty;
            }
        }
Esempio n. 2
0
        protected override void ShowData(int taskRiskRewardRankingXPersonId)
        {
            base.ShowData(taskRiskRewardRankingXPersonId);

            oDetailButtonPanel.SetId = SetId;

            Clear();

            var data = new TaskRiskRewardRankingXPersonDataManager.Data();

            data.TaskRiskRewardRankingXPersonId = taskRiskRewardRankingXPersonId;

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

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

                lblTaskRiskRewardRankingXPersonId.Text = item.TaskRiskRewardRankingXPersonId.ToString();
                lblTask.Text    = item.TaskId.ToString();
                lblRisk.Text    = item.RiskId.ToString();
                lblReward.Text  = item.RewardId.ToString();
                lblPerson.Text  = item.PersonId.ToString();
                lblRanking.Text = item.Ranking.ToString();

                oHistoryList.Setup(PrimaryEntity, taskRiskRewardRankingXPersonId, "TaskRiskRewardRankingXPerson");
            }
        }