Example #1
0
        private void saveEdits(IFeatureLayer pFLayer)
        {
            CSpatialSubs oSubs = new CSpatialSubs();

            IFeatureClass pFC    = pFLayer.FeatureClass;
            IWorkspace    pWkSpc = oSubs.returnWorkspace(pFC);

            if (pWkSpc.Type == esriWorkspaceType.esriRemoteDatabaseWorkspace)
            {
                if (SConst.EnableMedfordContent == true)
                {
                    if (System.Windows.Forms.MessageBox.Show("Would you like to update all the production and publication databases?", SConst.OrganizationName + " GIS Tools: Update Data", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                    {
                        try
                        {
                            using (CSpatialSubs oSpatialSubs = new CSpatialSubs())
                            {
                                oSpatialSubs.updateAllSDEDatabases(pFC);
                            }
                        }
                        catch (Exception ex)
                        {
                            System.Windows.Forms.MessageBox.Show("The update of the publication and production databases did not succeed.\r\n" + ex.Message, SConst.OrganizationName + " GIS Tools: Update Data", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
                        }
                    }
                }
            }
        }