예제 #1
0
        public override Boolean Equals(object obj)
        {
            if ((obj == null) || (obj.GetType() != this.GetType()))
            {
                return(false);
            }
            CONRecord castObj = (CONRecord)obj;

            return((castObj != null) && (this.Id == castObj.Id));
        }
예제 #2
0
        public CONRecord(CONRecord data, Options option) : base(data, option)
        {
            if (option == Options.Light || option == Options.Me || option == Options.All)
            {
                //OptionName.Light
                this.OperationCenter = data.OperationCenter;
                this.DocumentType    = data.DocumentType;
                this.DocumentNumber  = data.DocumentNumber;
                this.LogicalKey      = data.LogicalKey;
                this.RecordType      = data.RecordType;
                this.SubRecordType   = data.SubRecordType;
                this.Version         = data.Version;

                if (option == Options.Me || option == Options.All)
                {
                    this.RecordNumber = data.RecordNumber;
                    this.Fields       = XMLSerializer.DeserializeFromString <Dictionary <string, string> >(data.XMLData);
                    this.SQL          = (data.SQL != null) ? new CONSQL(data.SQL, Options.Light) : null;
                }
            }
        }