Ejemplo n.º 1
0
        private void RenameClassObject(IDataset dsCurrent, int standardID)
        {
            if (dsCurrent == null)
            {
                return;
            }

            Hy.Check.Define.StandardLayer standardLayer = LayerReader.GetLayerByName(dsCurrent.Name, standardID);
            //string strAliasName = Hy.Check.Rule.Helper.LayerReader.GetAliasName(dsCurrent.Name, standardID);
            if (standardLayer != null)// dsCurrent.Name != strAliasName)
            {
                ISchemaLock schemaLock = dsCurrent as ISchemaLock;
                schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);

                IClassSchemaEdit classSchemaEdit = dsCurrent as IClassSchemaEdit;
                if (classSchemaEdit != null)
                {
                    classSchemaEdit.AlterAliasName(standardLayer.AliasName);

                    ITable tCurrent = dsCurrent as ITable;
                    if (tCurrent != null)
                    {
                        List <Hy.Check.Define.StandardField> fields = FieldReader.GetFieldsByLayer(standardLayer.ID);
                        for (int i = 0; i < fields.Count; i++)
                        {
                            if (tCurrent.Fields.FindField(fields[i].Name) > -1)
                            {
                                classSchemaEdit.AlterFieldAliasName(fields[i].Name, fields[i].AliasName);
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private string ConstructErrorInfo()
        {
            string        strInfo;
            string        strFields = "";
            StandardLayer lyr       = LayerReader.GetLayerByName(m_structInvalidPara.strFtName, this.m_StandarID);

            if (lyr == null)
            {
                return("");
            }
            int lyrID = lyr.ID;

            if (m_structInvalidPara.fieldArray.Count > 0)
            {
                for (int i = 0; i < m_structInvalidPara.fieldArray.Count; i++)
                {
                    string strTFields = FieldReader.GetNameByAliasName(m_structInvalidPara.fieldArray[i], lyrID);
                    strFields = strFields + "|" + strTFields;
                }
            }
            string strCharset;

            strCharset = m_structInvalidPara.charSetArray[0];
            for (int j = 1; j < m_structInvalidPara.charSetArray.Count; j++)
            {
                strCharset += "," + m_structInvalidPara.charSetArray[j];
            }
            strInfo = "字段 " + strFields + " 值中含有不符合要求的字符(" + strCharset + ")中的一个或多个";

            return(strInfo);
        }
Ejemplo n.º 3
0
        private string ConstructErrorInfo()
        {
            string strInfo;

            strInfo = "线长度小于域值" + COMMONCONST.dLengthThread + " ";
            string        strFields = "";
            StandardLayer distLayer = LayerReader.GetLayerByName(m_structLengthPara.strFtName, SysDbHelper.GetStandardIDBySchemaID(this.m_SchemaID));

            if (m_structLengthPara.fieldArray != null)
            {
                for (int i = 0; i < m_structLengthPara.fieldArray.Count; i++)
                {
                    strFields = strFields + "|" + FieldReader.GetAliasName(m_structLengthPara.fieldArray[i], distLayer.ID);
                }
                strFields = strFields.Remove(0, 1);
                strFields = strFields + " 字段都为空";
                strInfo   = strInfo + ",并且 " + strFields;
            }


            return(strInfo);
        }
Ejemplo n.º 4
0
        private string ConstructErrorInfo()
        {
            string        strInfo   = "";
            string        strFields = "";
            StandardLayer distLayer = LayerReader.GetLayerByName(m_structBlankPara.strFtName, SysDbHelper.GetStandardIDBySchemaID(this.m_SchemaID));

            if (m_structBlankPara.fieldArray.Count > 0)
            {
                for (int i = 1; i < m_structBlankPara.fieldArray.Count; i++)
                {
                    strFields = strFields + "|" + FieldReader.GetAliasName(m_structBlankPara.fieldArray[i], distLayer.ID);
                }
                strFields = strFields.Remove(0, 1);
            }
            if (m_structBlankPara.iType == 0)
            {
                strInfo = "字段 " + strFields + " 都为空";
            }
            else if (m_structBlankPara.iType == 1)
            {
                strInfo = "字段 " + strFields + " 中有一个或多个为空";
            }
            return(strInfo);
        }