Esempio n. 1
0
 protected virtual void ReadRecord(System.Data.IDataReader reader, CodeFluent.Runtime.CodeFluentReloadOptions options)
 {
     if ((reader == null))
     {
         throw new System.ArgumentNullException("reader");
     }
     if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.Properties)
           == 0)
          == false))
     {
         this._id           = CodeFluentPersistence.GetReaderValue(reader, "Customer_Id", ((int)(-1)));
         this._name         = CodeFluentPersistence.GetReaderValue(reader, "Customer_Name", ((string)(default(string))));
         this._address      = CodeFluentPersistence.GetReaderValue(reader, "Customer_Address", ((string)(default(string))));
         this._city         = CodeFluentPersistence.GetReaderValue(reader, "Customer_City", ((string)(default(string))));
         this._zipCode      = CodeFluentPersistence.GetReaderValue(reader, "Customer_ZipCode", ((string)(default(string))));
         this._country      = CodeFluentPersistence.GetReaderValue(reader, "Customer_Country", ((string)(default(string))));
         this._phone        = CodeFluentPersistence.GetReaderValue(reader, "Customer_Phone", ((string)(default(string))));
         this._fax          = CodeFluentPersistence.GetReaderValue(reader, "Customer_Fax", ((string)(default(string))));
         this._webSite      = CodeFluentPersistence.GetReaderValue(reader, "Customer_WebSite", ((string)(default(string))));
         this._language     = ((SoftFluent.Json.NET.Language)(CodeFluentPersistence.GetReaderValueEnum(reader, "Customer_Language", ((SoftFluent.Json.NET.Language)(SoftFluent.Json.NET.Language.French)))));
         this._customerType = ((SoftFluent.Json.NET.CustomerType)(CodeFluentPersistence.GetReaderValueEnum(reader, "Customer_CustomerType", ((SoftFluent.Json.NET.CustomerType)(SoftFluent.Json.NET.CustomerType.Client)))));
     }
     if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.RowVersion)
           == 0)
          == false))
     {
         this._rowVersion = CodeFluentPersistence.GetReaderValue(reader, "_rowVersion", ((byte[])(null)));
     }
     this.OnEntityAction(new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.ReadRecord, false, false));
 }
Esempio n. 2
0
 protected virtual void ReadRecord(System.Data.IDataReader reader, CodeFluent.Runtime.CodeFluentReloadOptions options)
 {
     if ((reader == null))
     {
         throw new System.ArgumentNullException("reader");
     }
     if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.Properties)
           == 0)
          == false))
     {
         this._id                  = CodeFluentPersistence.GetReaderValue(reader, "Campaign_Id", ((int)(-1)));
         this._name                = CodeFluentPersistence.GetReaderValue(reader, "Campaign_Name", ((string)(default(string))));
         this._state               = ((SoftFluent.Json.NET.CampaignStateType)(CodeFluentPersistence.GetReaderValueEnum(reader, "Campaign_State", ((SoftFluent.Json.NET.CampaignStateType)(SoftFluent.Json.NET.CampaignStateType.Conceived)))));
         this.CustomerId           = CodeFluentPersistence.GetReaderValue(reader, "Campaign_Customer_Id", ((int)(-1)));
         this._price               = CodeFluentPersistence.GetReaderValue(reader, "Campaign_Price", ((decimal)(CodeFluentPersistence.DefaultDecimalValue)));
         this._priceAllTaxIncluded = CodeFluentPersistence.GetReaderValue(reader, "Campaign_PriceAllTaxIncluded", ((decimal)(CodeFluentPersistence.DefaultDecimalValue)));
         this._discountRate        = CodeFluentPersistence.GetReaderValue(reader, "Campaign_DiscountRate", ((decimal)(CodeFluentPersistence.DefaultDecimalValue)));
         this._conceptionDate      = CodeFluentPersistence.GetReaderValue(reader, "Campaign_ConceptionDate", ((System.DateTime)(CodeFluentPersistence.DefaultDateTimeValue)));
         this._addressedDate       = CodeFluentPersistence.GetReaderValue(reader, "Campaign_AddressedDate", ((System.DateTime)(CodeFluentPersistence.DefaultDateTimeValue)));
         this._propositionDate     = CodeFluentPersistence.GetReaderValue(reader, "Campaign_PropositionDate", ((System.DateTime)(CodeFluentPersistence.DefaultDateTimeValue)));
         this._confirmationDate    = CodeFluentPersistence.GetReaderValue(reader, "Campaign_ConfirmationDate", ((System.DateTime)(CodeFluentPersistence.DefaultDateTimeValue)));
     }
     if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.RowVersion)
           == 0)
          == false))
     {
         this._rowVersion = CodeFluentPersistence.GetReaderValue(reader, "_rowVersion", ((byte[])(null)));
     }
     this.OnEntityAction(new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.ReadRecord, false, false));
 }
 protected virtual void ReadRecord(System.Data.IDataReader reader, CodeFluent.Runtime.CodeFluentReloadOptions options)
 {
     if ((reader == null))
     {
         throw new System.ArgumentNullException("reader");
     }
     if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.Properties)
           == 0)
          == false))
     {
         this._id             = CodeFluentPersistence.GetReaderValue(reader, "Contact_Id", ((int)(-1)));
         this._email          = CodeFluentPersistence.GetReaderValue(reader, "Contact_Email", ((string)(default(string))));
         this._firstName      = CodeFluentPersistence.GetReaderValue(reader, "Contact_FirstName", ((string)(default(string))));
         this._lastName       = CodeFluentPersistence.GetReaderValue(reader, "Contact_LastName", ((string)(default(string))));
         this.ContactSourceId = CodeFluentPersistence.GetReaderValue(reader, "Contact_ContactSource_Id", ((int)(-1)));
         this._status         = ((ContactManager.Status)(CodeFluentPersistence.GetReaderValueEnum(reader, "Contact_Status", ((ContactManager.Status)(ContactManager.Status.Valid)))));
         this.AddressId       = CodeFluentPersistence.GetReaderValue(reader, "Contact_Address_Id", ((int)(-1)));
         this.UserId          = CodeFluentPersistence.GetReaderValue(reader, "Contact_User_Id", ((int)(-1)));
         this._description    = CodeFluentPersistence.GetReaderValue(reader, "Contact_Description", ((string)(default(string))));
     }
     if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.RowVersion)
           == 0)
          == false))
     {
         this._rowVersion = CodeFluentPersistence.GetReaderValue(reader, "_rowVersion", ((byte[])(null)));
     }
     this.OnEntityAction(new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.ReadRecord, false, false));
 }