Beispiel #1
0
        protected override DataTable GetEntityData(int?entityKey)
        {
            var activitydata = new ActivityDataModel();

            activitydata.ActivityId = entityKey;
            var results = ActivityDataManager.Search(activitydata, SessionVariables.RequestProfile);

            return(results);
        }
Beispiel #2
0
        private System.Data.DataTable GetData()
        {
            // TODO: on all export pages
            var data = new ActivityDataModel();

            var dt = ActivityDataManager.Search(data, SessionVariables.RequestProfile);

            return(dt);
        }
Beispiel #3
0
        protected override DataTable UpdateData()
        {
            var UpdatedData = new DataTable();

            var data = new ActivityDataModel();

            UpdatedData = ActivityDataManager.Search(data, SessionVariables.RequestProfile).Clone();
            for (var i = 0; i < SelectedData.Rows.Count; i++)
            {
                data.ActivityId =
                    Convert.ToInt32(SelectedData.Rows[i][ActivityDataModel.DataColumns.ActivityId].ToString());
                data.Name        = SelectedData.Rows[i][StandardDataModel.StandardDataColumns.Name].ToString();
                data.Description =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.Description))
                    ? CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.Description)
                    : SelectedData.Rows[i][StandardDataModel.StandardDataColumns.Description].ToString();

                data.SortOrder =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.SortOrder))
                    ? int.Parse(CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.SortOrder))
                    : int.Parse(SelectedData.Rows[i][StandardDataModel.StandardDataColumns.SortOrder].ToString());

                data.LayerId =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(ActivityDataModel.DataColumns.LayerId))
                    ? int.Parse(CheckAndGetRepeaterTextBoxValue(ActivityDataModel.DataColumns.LayerId))
                    : int.Parse(SelectedData.Rows[i][ActivityDataModel.DataColumns.LayerId].ToString());

                ActivityDataManager.Update(data, SessionVariables.RequestProfile);
                data            = new ActivityDataModel();
                data.ActivityId = Convert.ToInt32(SelectedData.Rows[i][ActivityDataModel.DataColumns.ActivityId].ToString());
                var dt = ActivityDataManager.Search(data, SessionVariables.RequestProfile);

                if (dt.Rows.Count == 1)
                {
                    UpdatedData.ImportRow(dt.Rows[0]);
                }
            }
            return(UpdatedData);
        }
Beispiel #4
0
 private void ReBindEditableGrid()
 {
     var data       = new ActivityDataModel();
     var dtActivity = ActivityDataManager.Search(data, SessionVariables.RequestProfile);
 }
Beispiel #5
0
        protected override DataTable GetData()
        {
            var dt = ActivityDataManager.Search(oSearchFilter.SearchParameters, SessionVariables.RequestProfile);

            return(dt);
        }