System.Data.DataSet.Merge C# (CSharp) Method

Merge() public method

public Merge ( DataRow rows ) : void
rows DataRow
return void
        public void Merge(DataRow[] rows)
        {
            long logScopeId = DataCommonEventSource.Log.EnterScope("<ds.DataSet.Merge|API> {0}, rows", ObjectID);
            try
            {
                Merge(rows, false, MissingSchemaAction.Add);
            }
            finally
            {
                DataCommonEventSource.Log.ExitScope(logScopeId);
            }
        }

Same methods

DataSet::Merge ( DataRow rows, bool preserveChanges, MissingSchemaAction missingSchemaAction ) : void
DataSet::Merge ( DataSet dataSet ) : void
DataSet::Merge ( DataSet dataSet, bool preserveChanges ) : void
DataSet::Merge ( DataSet dataSet, bool preserveChanges, MissingSchemaAction missingSchemaAction ) : void
DataSet::Merge ( DataTable table ) : void
DataSet::Merge ( DataTable table, bool preserveChanges, MissingSchemaAction missingSchemaAction ) : void

Usage Example

Beispiel #1
0
        /// <summary>
        /// Update the dataset object by fetching from the database.
        /// </summary>
        /// <returns>Dataset object.</returns>
        public override DataSet GetData()
        {
            int CustomVocationalJobPlacementId = -1;

            using (SHS.UserBusinessServices.DetailPages objectCpt = new SHS.UserBusinessServices.DetailPages())
            {
                if (base.GetRequestParameterValue("CustomVocationalJobPlacementId").Length > 0)
                {
                    int.TryParse(base.GetRequestParameterValue("CustomVocationalJobPlacementId"), out CustomVocationalJobPlacementId);
                }
                else // Get AuthorizationcodeId after save
                {
                    if (BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet != null)
                    {
                        if (BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet.Tables["CustomVocationalJobPlacements"].Rows[0]["CustomVocationalJobPlacementId"] != null)
                        {
                            int.TryParse(BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet.Tables["CustomVocationalJobPlacements"].Rows[0]["CustomVocationalJobPlacementId"].ToString(), out CustomVocationalJobPlacementId);
                        }
                    }
                }
                System.Data.DataSet dataSetCustomVocationalJobPlacement = new System.Data.DataSet();
                dataSetCustomVocationalJobPlacement = (SHS.BaseLayer.BaseCommonFunctions.GetPageDataSet(PageDataSetName));

                DataSet dataSetObject = null;
                if (CustomVocationalJobPlacementId >= 0)
                {
                    dataSetObject = objectCpt.GetJobPlacementDetails(CustomVocationalJobPlacementId);
                    HiddenField_CustomVocationalJobPlacements_CustomVocationalJobPlacementId.Value = dataSetObject.Tables["CustomVocationalJobPlacements"].Rows[0]["CustomVocationalJobPlacementId"].ToString();

                    //if (dataSetObject.Tables["ClientPrograms"].Rows[0]["PrimaryAssignment"].ToString() == "Y")
                    //    CheckBox_ClientPrograms_PrimaryAssignment.Checked = true;
                    //else
                    //    CheckBox_ClientPrograms_PrimaryAssignment.Checked = false;
                }


                if (dataSetObject != null)
                {
                    if (!dataSetObject.IsRowExists("CustomVocationalJobPlacements"))
                    {
                        dataSetObject = BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet = base.DocumentInitializeDocument();
                    }

                    try
                    {
                        dataSetCustomVocationalJobPlacement.Merge(dataSetObject);
                    }
                    catch
                    {
                        dataSetCustomVocationalJobPlacement.Merge(dataSetObject);
                    }
                }

                SHS.BaseLayer.BaseCommonFunctions.UnsavedProcessDetailPage(this.ParentDetailPageObject.UnSavedChangeId, 0, this.ParentDetailPageObject.ScreenId, SHS.BaseLayer.SharedTables.StaffSharedTables.UnsavedChanges, this.ParentDetailPageObject, dataSetObject, dataSetCustomVocationalJobPlacement, PageDataSetName);
                return(dataSetCustomVocationalJobPlacement);
            }
        }
All Usage Examples Of System.Data.DataSet::Merge