protected override void OnLoad(EventArgs e) { base.OnLoad(e); SuperKey = ApplicationCommon.GetSuperKey(); SetId = ApplicationCommon.GetSetId(); if (!string.IsNullOrEmpty(SuperKey)) { var lstEntityKeys = ApplicationCommon.GetSuperKeyDetails(PrimaryEntity.Value(), SuperKey); foreach (var entityKey in lstEntityKeys) { AddDetailControl(false, entityKey); if (string.IsNullOrEmpty(DeleteIds)) { DeleteIds = entityKey.ToString(); } else { DeleteIds += ", " + entityKey.ToString(); } } } else if (SetId != 0) { AddDetailControl(true, SetId); DeleteIds = SetId.ToString(); } ShowAuditHistory(true); }
protected override void OnInit(EventArgs e) { try { base.OnInit(e); SuperKey = ApplicationCommon.GetSuperKey(); SetId = ApplicationCommon.GetSetId(); var detailsControlPath = "~/Shared/Configuration/UserPreferenceKey/Controls/Details.ascx"; if (!string.IsNullOrEmpty(SuperKey)) { var data = new SuperKeyDetailDataModel(); data.SuperKeyId = Convert.ToInt32(SuperKey); // Change System Entity Type data.SystemEntityTypeId = (int)Framework.Components.DataAccess.SystemEntity.UserPreferenceKey; var dt = Framework.Components.Core.SuperKeyDetailDataManager.Search(data, SessionVariables.RequestProfile); if (dt != null && dt.Rows.Count > 0) { foreach (System.Data.DataRow dr in dt.Rows) { var key = Convert.ToInt32(dr[SuperKeyDetailDataModel.DataColumns.EntityKey]); if (string.IsNullOrEmpty(DeleteIds)) { DeleteIds = key.ToString(); } else { DeleteIds += "," + key.ToString(); } var detailsControl = (Controls.Details)Page.LoadControl(detailsControlPath); detailsControl.SetId = key; detailsControl.BorderClass = ApplicationCommon.DetailsBorderClassName; plcDetailsList.Controls.Add(detailsControl); plcDetailsList.Controls.Add(new LiteralControl("<br />")); chkVisible.Checked = detailsControl.IsHistoryVisible; } } } else if (SetId != 0) { DeleteIds = SetId.ToString(); var detailsControl = (Controls.Details)Page.LoadControl(detailsControlPath); detailsControl.SetId = SetId; plcDetailsList.Controls.Add(detailsControl); chkVisible.Checked = detailsControl.IsHistoryVisible; } } catch (Exception ex) { Response.Write(ex.Message); } }
public override int GetHashCode() { return((SetId.ToString() + "|" + Language).GetHashCode()); }