Ejemplo n.º 1
0
        private void AssemblyCopyToModel(IGTPolygonGeometry oGeometry)
        {
            int    ownerID = 0;
            int    lRecords;
            double dGeoOrientation = 0.0;

            try
            {
                frmAssmbly                  = new frmAssembly();
                frmAssmbly.Application      = m_GTApplication;
                frmAssmbly.FeatureFNO       = m_ActiveGraphicComponent.FNO;
                frmAssmbly.DetailIdentifier = m_ActiveMapWindow.DetailID;
                frmAssmbly.ShowDialog();
                if (frmAssmbly.FeatureIdentifier != 0)
                {
                    ownerID = GetOwnerIdentifier();
                    GetAssemblyPointsAndOrientation(oGeometry, ref dGeoOrientation);
                    ADODB.Recordset oRS = m_GTApplication.DataContext.Execute("{call OC_EXECUTE_DEEPCOPY(" + m_ActiveGraphicComponent.FNO.ToString() + " ," +
                                                                              frmAssmbly.FeatureIdentifier.ToString() + ", " +
                                                                              m_ActiveGraphicComponent.FNO.ToString() + ", " +
                                                                              m_ActiveGraphicComponent.CNO.ToString() + ", " +
                                                                              m_ActiveGraphicComponent.FID.ToString() + ", " +
                                                                              ownerID.ToString() + ", " + dGeoOrientation + ", " + m_ActiveMapWindow.DetailID + ")}", out lRecords, 1, new object[1]);
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        private void AssemblyCopyToModel(IGTPolygonGeometry oGeometry)
        {
            int      ownerID   = 0;
            IGTPoint firstPnt  = null;
            IGTPoint secondPnt = null;
            IGTPoint thirtPnt  = null;
            int      lRecords;
            double   dGeoOrientation = 0.0;

            try
            {
                frmAssmbly             = new frmAssembly();
                frmAssmbly.Application = m_GTApplication;
                frmAssmbly.FeatureFNO  = m_ActiveGraphicComponent.FNO;
                frmAssmbly.ShowDialog();
                if (frmAssmbly.FeatureIdentifier != 0)
                {
                    ownerID = GetOwnerIdentifier();
                    GetAssemblyPointsAndOrientation(oGeometry, ref firstPnt, ref secondPnt, ref thirtPnt, ref dGeoOrientation);
                    //string assemblyQuery = "BEGIN G3E_DeepCopy.CopyChildrenToModel(" + m_ActiveGraphicComponent.FNO.ToString() + " ," +
                    //                                                frmAssmbly.FeatureIdentifier.ToString() + ", " +
                    //                                                m_ActiveGraphicComponent.FNO.ToString() + ", " +
                    //                                                m_ActiveGraphicComponent.CNO.ToString() + ", " +
                    //                                                m_ActiveGraphicComponent.FID.ToString() + ", " +
                    //                                                ownerID.ToString() + ", '" +
                    //                                                firstPnt.X.ToString().Replace(",", ".") + "', '" +
                    //                                                firstPnt.Y.ToString().Replace(",", ".") + "', '" +
                    //                                                secondPnt.X.ToString().Replace(",", ".") + "', '" +
                    //                                                secondPnt.Y.ToString().Replace(",", ".") + "', '" +
                    //                                                thirtPnt.X.ToString().Replace(",", ".") + "', '" +
                    //                                                thirtPnt.Y.ToString().Replace(",", ".") + "', '" +
                    //                                                dGeoOrientation.ToString().Replace(",", ".") + "'," +
                    //                                                "' 0 '," +
                    //                                                "' 0 '," +
                    //                                                "' 0 '," +
                    //                                                "' 0 '," +
                    //                                                "' 0 '," +
                    //                                                "' 0 '," +
                    //                                                "' 0 '," +
                    //                                                "' 0 '" + "); END;";

                    string assemblyQuery = "BEGIN OC_EXECUTE_DEEPCOPY(" + m_ActiveGraphicComponent.FNO.ToString() + " ," +
                                           frmAssmbly.FeatureIdentifier.ToString() + ", " +
                                           m_ActiveGraphicComponent.FNO.ToString() + ", " +
                                           m_ActiveGraphicComponent.CNO.ToString() + ", " +
                                           m_ActiveGraphicComponent.FID.ToString() + ", " +
                                           ownerID.ToString() + "); END;";
                    Recordset oRS = m_GTApplication.DataContext.Execute(assemblyQuery, out lRecords, (int)CommandTypeEnum.adCmdText, new object());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }