Exemple #1
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());
        }
Exemple #2
0
        override protected void btnUpdate_Click(object sender, EventArgs e)
        {
            var UpdatedData = UpdateData();

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