示例#1
0
        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);
        }
示例#2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            SuperKey = ApplicationCommon.GetSuperKey();

            // should be client side ... maybe
            if (!string.IsNullOrEmpty(SuperKey))
            {
                BtnCancel.Visible = true;
                BtnUpdate.Visible = true;
                BtnClone.Visible  = false;

                var lstEntityKeys = ApplicationCommon.GetSuperKeyDetails(PrimaryEntity.Value(), SuperKey);

                foreach (var entityKey in lstEntityKeys)
                {
                    AddUpdateControl(false, entityKey);
                }

                return;
            }

            SetId = ApplicationCommon.GetSetId();
            if (SetId != 0)
            {
                BtnUpdate.Visible = true;
                BtnCancel.Visible = true;
                BtnClone.Visible  = false;

                AddUpdateControl(true, SetId);
            }
        }
示例#3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            SuperKey = ApplicationCommon.GetSuperKey();

            if (!string.IsNullOrEmpty(SuperKey))
            {
                var lstEntityKeys = ApplicationCommon.GetSuperKeyDetails(PrimaryEntity.Value(), SuperKey);

                foreach (var entityKey in lstEntityKeys)
                {
                    AddDetailControl(false, entityKey);
                }

                return;
            }

            SetId = ApplicationCommon.GetSetId();
            if (SetId != 0)
            {
                AddDetailControl(true, SetId);
            }
        }
示例#4
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            ViewName = "CommonUpdate";

            DynamicUpdatePanelCore.AddColumns(GetColumns());
            SuperKey = ApplicationCommon.GetSuperKey();
            SetId    = ApplicationCommon.GetSetId();

            var results = GetEntityData(null).Clone();

            if (!string.IsNullOrEmpty(SuperKey))
            {
                var lstEntityKeys = ApplicationCommon.GetSuperKeyDetails(PrimaryEntity.Value(), SuperKey);

                foreach (var entityKey in lstEntityKeys)
                {
                    var dt = GetEntityData(entityKey);
                    if (dt.Rows.Count == 1)
                    {
                        results.ImportRow(dt.Rows[0]);
                    }
                }
            }
            else
            {
                var dt = GetEntityData(SetId);
                if (dt.Rows.Count == 1)
                {
                    results.ImportRow(dt.Rows[0]);
                }
            }
            SelectedData = results.Copy();

            DynamicUpdatePanelCore.SetUp(GetColumns(), PrimaryEntityKey, GetData());
        }