Beispiel #1
0
 public void Prepare(System.IServiceProvider locator)
 {
     this.cms.Reset();
     this.locator = locator;
     this.list.Clear();
     this.one = null;
 }
        internal void UpdateWithAnother(global::FormXYZ.Input result)
        {
            this.URI = result.URI;

            this.Submission     = result.Submission;
            this._SubmissionURI = result._SubmissionURI;
            this.SubmissionID   = result.SubmissionID;
            this.LastPurchase   = result.LastPurchase;
            this.JKhdk          = result.JKhdk;
            this.Qjfs           = result.Qjfs;
            this.ID             = result.ID;
        }
        public static global::FormXYZ.Input CreateFromExtendedRecord(Revenj.Utility.BufferedTextReader reader, int outerContext, int context, IServiceProvider locator)
        {
            reader.Read(outerContext);
            var item = new global::FormXYZ.Input(locator);

            foreach (var config in ReaderExtendedConfiguration)
            {
                config(item, reader, context, locator);
            }
            reader.Read(outerContext);

            item.URI = _DatabaseCommon.FactoryFormXYZ_Input.InputConverter.BuildURI(reader.CharBuffer, item.ID);
            item.__DataCacheSubmission = new Lazy <IDataCache <global::UseCase1.Submission> >(() => locator.Resolve <IDataCache <global::UseCase1.Submission> >());
            item.__ResetChangeTracking();
            return(item);
        }
Beispiel #4
0
            internal void CollectOne(System.Data.IDataReader dr)
            {
                var _pg  = dr.GetValue(0);
                var _str = _pg as string;

                if (_str != null)
                {
                    one = _DatabaseCommon.FactoryFormXYZ_Input.InputConverter.CreateFromRecord(cms.UseBufferedReader(_str), 0, locator);
                }
                else
                {
                    var _tr = _pg as System.IO.TextReader ?? new System.IO.StringReader(_pg.ToString());
                    try { one = _DatabaseCommon.FactoryFormXYZ_Input.InputConverter.CreateFromRecord(cms.UseBufferedReader(_tr), 0, locator); }
                    finally { _tr.Dispose(); }
                }
            }
        public static IPostgresTuple CreateExtendedTupleFrom(global::FormXYZ.Input item)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            items[ExtendedProperty_ID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            if (item.SubmissionURI != null)
            {
                items[ExtendedProperty_SubmissionURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.SubmissionURI);
            }
            ;
            items[ExtendedProperty_SubmissionID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.SubmissionID);
            items[ExtendedProperty_LastPurchase_Index] = _DatabaseCommon.Utility.TimestampToTuple(item.LastPurchase);
            items[ExtendedProperty_JKhdk_Index]        = _DatabaseCommon.Utility.StringToTuple(item.JKhdk);
            items[ExtendedProperty_Qjfs_Index]         = _DatabaseCommon.Utility.IntegerToTuple(item.Qjfs);
            return(RecordTuple.From(items));
        }