Beispiel #1
0
        protected override void ShowData(int FieldConfigurationModeXApplicationRoleId)
        {
            base.ShowData(FieldConfigurationModeXApplicationRoleId);

            oDetailButtonPanel.SetId = SetId;

            Clear();

            var data = new FieldConfigurationModeXApplicationRoleDataModel();

            data.FieldConfigurationModeXApplicationRoleId = FieldConfigurationModeXApplicationRoleId;

            var entityList = FieldConfigurationModeXApplicationRoleDataManager.GetEntityList(data, SessionVariables.RequestProfile);

            if (entityList.Count == 1)
            {
                foreach (var entityItem in entityList)
                {
                    lblFieldConfigurationModeXApplicationRoleId.Text = entityItem.FieldConfigurationModeXApplicationRoleId.ToString();
                    lblFieldConfigurationMode.Text           = entityItem.FieldConfigurationMode;
                    lblApplicationRole.Text                  = entityItem.ApplicationRole;
                    lblFieldConfigurationModeAccessMode.Text = entityItem.FieldConfigurationModeAccessMode;

                    oUpdateInfo.LoadText(entityItem.UpdatedDate, entityItem.UpdatedBy, entityItem.LastAction);

                    oHistoryList.Setup((int)Framework.Components.DataAccess.SystemEntity.FieldConfigurationModeXApplicationRole, FieldConfigurationModeXApplicationRoleId, "FieldConfigurationModeXApplicationRole");
                    dynAuditHistory.Visible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.HistoryGridVisibilityKey, "FieldConfigurationModeXApplicationRole");
                }
            }
        }
Beispiel #2
0
        public void LoadData(int FieldConfigurationModeXApplicationRoleId, bool showId)
        {
            var data = new FieldConfigurationModeXApplicationRoleDataModel();

            data.FieldConfigurationModeXApplicationRoleId = FieldConfigurationModeXApplicationRoleId;

            var oFieldConfigurationModeXApplicationRoleTable = FieldConfigurationModeXApplicationRoleDataManager.GetEntityList(data, SessionVariables.RequestProfile);

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

            var item = oFieldConfigurationModeXApplicationRoleTable[0];

            if (!showId)
            {
                FieldConfigurationModeXApplicationRoleId = item.FieldConfigurationModeXApplicationRoleId.Value;
                FieldConfigurationModeId           = item.FieldConfigurationModeId;
                ApplicationRoleId                  = item.ApplicationRoleId;
                FieldConfigurationModeAccessModeId = item.FieldConfigurationModeAccessModeId;
                dynAuditHistory.Visible            = true;

                txtFieldConfigurationModeXApplicationRoleId.Text = item.FieldConfigurationModeXApplicationRoleId.Value.ToString();

                // only show Audit History in case of Update page, not for Clone.
                oHistoryList.Setup(PrimaryEntity, FieldConfigurationModeXApplicationRoleId, PrimaryEntityKey);
                dynAuditHistory.Visible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.HistoryGridVisibilityKey, "FieldConfigurationModeXApplicationRole");
            }

            else
            {
                txtFieldConfigurationModeXApplicationRoleId.Text = String.Empty;
            }

            //drpApplicationRoleList.SelectedValue      = Convert.ToString(row[FieldConfigurationModeXApplicationRoleDataModel.DataColumns.ApplicationRoleId]);
            //drpFieldConfigurationModeList.SelectedValue = Convert.ToString(row[FieldConfigurationModeXApplicationRoleDataModel.DataColumns.FieldConfigurationModeId]);

            //oUpdateInfo.LoadText(oFieldConfigurationModeXApplicationRoleTable.Rows[0]);
        }