Пример #1
0
        protected override DataTable UpdateData()
        {
            var UpdatedData = new DataTable();

            var data = new LayerDataModel();

            UpdatedData = LayerDataManager.Search(data, SessionVariables.RequestProfile).Clone();
            for (var i = 0; i < SelectedData.Rows.Count; i++)
            {
                data.LayerId =
                    Convert.ToInt32(SelectedData.Rows[i][LayerDataModel.DataColumns.LayerId].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).ToString())
                                        : int.Parse(SelectedData.Rows[i][StandardDataModel.StandardDataColumns.SortOrder].ToString());

                LayerDataManager.Update(data, SessionVariables.RequestProfile);
                data         = new LayerDataModel();
                data.LayerId = Convert.ToInt32(SelectedData.Rows[i][LayerDataModel.DataColumns.LayerId].ToString());
                var dt = LayerDataManager.Search(data, SessionVariables.RequestProfile);

                if (dt.Rows.Count == 1)
                {
                    UpdatedData.ImportRow(dt.Rows[0]);
                }
            }
            return(UpdatedData);
        }
Пример #2
0
        private System.Data.DataTable GetData()
        {
            var data = new LayerDataModel();
            var dt   = LayerDataManager.Search(data, SessionVariables.RequestProfile);

            return(dt);
        }
Пример #3
0
        protected override DataTable GetEntityData(int?entityKey)
        {
            var layerdata = new LayerDataModel();

            layerdata.LayerId = entityKey;
            var results = LayerDataManager.Search(layerdata, SessionVariables.RequestProfile);

            return(results);
        }
Пример #4
0
        protected override DataTable GetData()
        {
            var dt = LayerDataManager.Search(oSearchFilter.SearchParameters, SessionVariables.RequestProfile);

            return(dt);
        }
Пример #5
0
 private void ReBindEditableGrid()
 {
     var data    = new LayerDataModel();
     var dtLayer = LayerDataManager.Search(data, SessionVariables.RequestProfile);
 }