Exemple #1
0
        internal MemberInfo(SafeDataReader dr)
        {
            _id             = dr.GetInt32("id");
            _first_name     = dr.GetString("first_name");
            _last_name      = dr.GetString("last_name");
            _en_first       = dr.GetString("en_first_name");
            _en_last        = dr.GetString("en_last_name");
            _email          = dr.GetString("email");
            _address        = dr.GetString("address");
            _city           = dr.GetString("city");
            _statecode      = dr.GetString("statecode");
            _zipcode        = dr.GetString("zipcode");
            _home           = dr.GetString("home");
            _age            = dr.GetInt32("age");
            _familyname     = dr.GetString("family_name");
            _fellowshipdate = dr.GetSmartDate("fellowship_date", _fellowshipdate.EmptyIsMin);
            _fellowship     = dr.GetString("fellowshipname");
            _birthday       = dr.GetSmartDate("birthday", _birthday.EmptyIsMin);

            if (dr.GetBoolean("sex"))
            {
                _sex = Resources.Male.ToString();
            }
            else
            {
                _sex = Resources.Female.ToString();
            }

            if (dr.GetBoolean("married"))
            {
                _marrige = Resources.Married;
            }
            else
            {
                _marrige = Resources.Single;
            }

            _relastionship        = dr.GetString("relationship");
            _spousename           = dr.GetString("spousename");
            _spouseid             = dr.GetInt32("spouse");
            _job                  = dr.GetString("job");
            _cell                 = dr.GetString("cell");
            _cellname             = dr.GetString("cellname");
            _regdate              = dr.GetSmartDate("regdate");
            _regdate.FormatString = "yyyy-MM-dd";
            _baptismname          = dr.GetString("baptismName");
            _baptism_year         = dr.GetSmartDate("baptism_year");
            _subdivision          = dr.GetString("SubDivisionName");
            _familycode           = dr.GetInt32("family_code");
            _statuscode           = dr.GetInt32("StatusCode");
            _statusname           = dr.GetString("StatusName");
            if (dr.GetBoolean("active"))
            {
                _active = Resources.Active;
            }
            else
            {
                _active = Resources.InActive;
            }
        }
Exemple #2
0
 private void FetchObject(SafeDataReader dr)
 {
     _id                 = dr.GetGuid("Id");
     _entryId            = dr.GetGuid("EntryId");
     _juryid             = dr.GetGuid("Juryid");
     _scoresc            = dr.GetInt32("ScoreSC");
     _scoreid            = dr.GetInt32("ScoreID");
     _scoreil            = dr.GetInt32("ScoreIL");
     _scorere            = dr.GetInt32("ScoreRE");
     _scorecomposite     = dr.GetDouble("ScoreComposite");
     _feedbackStrong     = dr.GetString("FeedbackStrong");
     _feedbackWeak       = dr.GetString("FeedbackWeak");
     _flag               = dr.GetString("Flag");
     _flagOthers         = dr.GetString("FlagOthers");
     _isRecuse           = dr.GetBoolean("IsRecuse");
     _isSubmitted        = dr.GetBoolean("IsSubmitted");
     _isAdminRecuse      = dr.GetBoolean("IsAdminRecuse");
     _recuseRemarks      = dr.GetString("RecuseRemarks");
     _additionalComments = dr.GetString("AdditionalComments");
     _isAdvancement      = dr.GetBoolean("IsAdvancement");
     _dateSubmitted      = dr.GetSmartDate("DateSubmitted", _dateSubmitted.EmptyIsMin);
     _dateCreated        = dr.GetSmartDate("DateCreated", _dateCreated.EmptyIsMin);
     _round              = dr.GetString("Round");
     _Nomination         = dr.GetString("Nomination");
 }
Exemple #3
0
 private void FetchObject(SafeDataReader dr)
 {
     _id                   = dr.GetGuid("Id");
     _type                 = dr.GetString("Type");
     _salutation           = dr.GetString("Salutation");
     _firstName            = dr.GetString("FirstName");
     _lastName             = dr.GetString("LastName");
     _email                = dr.GetString("Email");
     _company              = dr.GetString("Company");
     _dietary              = dr.GetString("Dietary");
     _isJuryCocktail       = dr.GetBoolean("IsJuryCocktail");
     _isWelcomeDinner      = dr.GetBoolean("IsWelcomeDinner");
     _isGalaDinner         = dr.GetBoolean("IsGalaDinner");
     _respond              = dr.GetBoolean("RSVPRespond");
     _userData1            = dr.GetString("UserData1");
     _userData2            = dr.GetString("UserData2");
     _userData3            = dr.GetString("UserData3");
     _userData4            = dr.GetString("UserData4");
     _userData5            = dr.GetString("UserData5");
     _isInvitingGalaDinner = dr.GetBoolean("IsInvitingGalaDinner");
     _round1PanelID        = dr.GetString("Round1PanelID");
     _round2PanelID        = dr.GetString("Round2PanelID");
     _workflowStatus       = dr.GetString("WorkflowStatus");
     _location             = dr.GetString("Location");
     _dateCreated          = dr.GetSmartDate("DateCreated", _dateCreated.EmptyIsMin);
     _dateModified         = dr.GetSmartDate("DateModified", _dateModified.EmptyIsMin);
 }
Exemple #4
0
        private UserInfoDto Fetch(SafeDataReader dr)
        {
            var userInfo = new UserInfoDto();

            // Value properties
            userInfo.Id                                          = dr.GetInt64("id");
            userInfo.User_name                                   = dr.GetString("user_name");
            userInfo.Password                                    = dr.GetString("password");
            userInfo.Password_salt                               = dr.GetString("password_salt");
            userInfo.Password_question                           = !dr.IsDBNull("password_question") ? dr.GetString("password_question") : null;
            userInfo.Password_answer                             = !dr.IsDBNull("password_answer") ? dr.GetString("password_answer") : null;
            userInfo.Is_approved                                 = dr.GetBoolean("is_approved");
            userInfo.Fullname                                    = dr.GetString("fullname");
            userInfo.Email                                       = dr.GetString("email");
            userInfo.Tel                                         = !dr.IsDBNull("tel") ? dr.GetString("tel") : null;
            userInfo.Last_login_date                             = dr.GetSmartDate("last_login_date", true);
            userInfo.Last_password_changed_date                  = dr.GetSmartDate("last_password_changed_date", true);
            userInfo.Last_lockout_date                           = dr.GetSmartDate("last_lockout_date", true);
            userInfo.Failed_password_attempt_count               = dr.GetInt64("failed_password_attempt_count");
            userInfo.Failed_password_attempt_window_start        = dr.GetSmartDate("failed_password_attempt_window_start", true);
            userInfo.Failed_password_answer_attempt_count        = dr.GetInt64("failed_password_answer_attempt_count");
            userInfo.Failed_password_answer_attempt_window_start = dr.GetSmartDate("failed_password_answer_attempt_window_start", true);
            userInfo.Birthday                                    = !dr.IsDBNull("birthday") ? dr.GetSmartDate("birthday", true) : null;
            userInfo.Address                                     = !dr.IsDBNull("address") ? dr.GetString("address") : null;
            userInfo.Website                                     = !dr.IsDBNull("website") ? dr.GetString("website") : null;
            userInfo.Avatar                                      = !dr.IsDBNull("avatar") ? dr.GetString("avatar") : null;
            userInfo.Is_lock                                     = dr.GetBoolean("is_lock");
            userInfo.User_type                                   = (Int64?)dr.GetValue("user_type");
            userInfo.Last_modified                               = dr.GetSmartDate("last_modified", true);
            userInfo.Last_user_id                                = dr.GetInt64("last_user_id");

            return(userInfo);
        }
Exemple #5
0
        private MemberInfoBase(SafeDataReader dr)
        {
            MemberId = dr.GetInt32("memberid");
            Ko_Name  = string.Format("{0}{1}", dr.GetString("last_name"), dr.GetString("first_name"));
            En_Name  = string.Format("{0} {1}", dr.GetString("en_first_name"), dr.GetString("en_last_name"));

            Email        = dr.GetString("email");
            Address      = dr.GetString("address");
            City         = dr.GetString("city");
            State        = dr.GetString("statecode");
            Zipcode      = dr.GetString("zipcode");
            Home         = dr.GetString("home");
            Age          = dr.GetInt32("age");
            FamilyName   = dr.GetString("family_name");
            BirthDay     = dr.GetSmartDate("birthday").Text;
            Sex          = dr.GetBoolean("sex")? Resources.Male.ToString() : Resources.Female.ToString();
            Married      = dr.GetBoolean("married") ? Resources.Married : Resources.Single;
            RelationShip = dr.GetString("relationship");
            Spouse       = dr.GetString("spousename");
            Job          = dr.GetString("job");
            Cell         = dr.GetString("cell");
            CellName     = dr.GetString("cellname");
            RegDate      = dr.GetSmartDate("regdate").Text;
            Baptism      = dr.GetString("BaptismName");
            Baptism_year = dr.GetSmartDate("baptism_year").Text;
            SubDivision  = dr.GetString("SubDivisionName");
            FamilyCode   = dr.GetInt32("family_code");
            StatusCode   = dr.GetInt32("StatusCode");
            Active       = dr.GetBoolean("active") ? Resources.Active : Resources.InActive;
        }
Exemple #6
0
 private void FetchObject(SafeDataReader dr)
 {
     _id           = dr.GetGuid("Id");
     _description  = dr.GetString("Description");
     _bodyname     = dr.GetString("Bodyname");
     _header       = dr.GetString("Header");
     _isActive     = dr.GetBoolean("isActive");
     _type         = dr.GetString("Type");
     _subHeader    = dr.GetString("SubHeader");
     _dateCreated  = dr.GetSmartDate("DateCreated", _dateCreated.EmptyIsMin);
     _dateModified = dr.GetSmartDate("DateModified", _dateModified.EmptyIsMin);
     _isHasOther   = dr.GetBoolean("isHasOther");
 }
Exemple #7
0
 private void FetchObject(SafeDataReader dr)
 {
     _id            = dr.GetGuid("Id");
     _dateReceived  = dr.GetSmartDate("DateReceived", _dateReceived.EmptyIsMin);
     _paygroupId    = dr.GetGuid("PaygroupId");
     _invoice       = dr.GetString("Invoice");
     _amount        = dr.GetDecimal("Amount");
     _remarks       = dr.GetString("Remarks");
     _isSetPaid     = dr.GetBoolean("IsSetPaid");
     _dateCreated   = dr.GetSmartDate("DateCreated", _dateCreated.EmptyIsMin);
     _isAdmin       = dr.GetBoolean("isAdmin");
     _commentatorID = dr.GetGuid("CommentatorID");
 }
        /// <summary>
        /// Loads a <see cref="PropertyConfiguration"/> object from the given SafeDataReader.
        /// </summary>
        /// <param name="dr">The SafeDataReader to use.</param>
        private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(ConfigurationIdProperty, dr.GetInt32("ConfigurationId"));
            LoadProperty(ObjectNameProperty, dr.GetString("ObjectName"));
            LoadProperty(NameProperty, dr.GetString("Name"));
            LoadProperty(IsRequiredProperty, dr.GetBoolean("IsRequired"));
            LoadProperty(IsReadOnlyProperty, dr.GetBoolean("IsReadOnly"));
            LoadProperty(IsVisibleProperty, dr.GetBoolean("IsVisible"));
            LoadProperty(ListOrderProperty, dr.GetInt32("ListOrder"));
            var args = new DataPortalHookArgs(dr);

            OnFetchRead(args);
        }
        /// <summary>
        /// Loads a <see cref="PropertyConfigurationInfo"/> object from the given SafeDataReader.
        /// </summary>
        /// <param name="dr">The SafeDataReader to use.</param>
        private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(ObjectNameProperty, dr.GetString("ObjectName"));
            LoadProperty(NameProperty, dr.GetString("Name"));
            LoadProperty(UICultureProperty, dr.GetString("UICulture"));
            LoadProperty(FriendlyNameProperty, dr.GetString("FriendlyName"));
            LoadProperty(IsRequiredProperty, dr.GetBoolean("IsRequired"));
            LoadProperty(IsReadOnlyProperty, dr.GetBoolean("IsReadOnly"));
            LoadProperty(IsVisibleProperty, dr.GetBoolean("IsVisible"));
            var args = new DataPortalHookArgs(dr);

            OnFetchRead(args);
        }
Exemple #10
0
        private CellRole(SafeDataReader dr)
        {
            MarkAsChild();
            _idSet          = true;
            _code           = dr.GetInt32("code");
            _name           = dr.GetString("name");
            _multipleAssign = dr.GetBoolean("multiple_assign");
            _level          = dr.GetInt32("levels");
            _default        = dr.GetBoolean("default_level");
            _updateBy       = dr.GetString("update_by");
            _username       = Dothan.ApplicationContext.User.Identity.Name;

            dr.GetBytes("lastchanged", 0, _lastchanged, 0, 8);
            MarkOld();
        }
Exemple #11
0
        protected void Fetch(SafeDataReader sdr)
        {
            using (BypassPropertyChecks)
            {
                int i = 0;
                LoadProperty(MovieIDProperty, sdr.GetInt32(i++));
                LoadProperty(MovieGenreIDProperty, sdr.GetInt32(i++));
                LoadProperty(MovieTitleProperty, sdr.GetString(i++));
                LoadProperty(MovieDescriptionProperty, sdr.GetString(i++));
                LoadProperty(MovieImageURLProperty, sdr.GetString(i++));
                LoadProperty(PriceProperty, sdr.GetDecimal(i++));
                LoadProperty(ReleaseDateProperty, sdr.GetValue(i++));
                LoadProperty(IsActiveIndProperty, sdr.GetBoolean(i++));
                LoadProperty(DeletedDateProperty, sdr.GetValue(i++));
                LoadProperty(DeletedByProperty, sdr.GetInt32(i++));
                LoadProperty(CreatedDateProperty, sdr.GetSmartDate(i++));
                LoadProperty(CreatedByProperty, sdr.GetInt32(i++));
                LoadProperty(ModifiedDateProperty, sdr.GetSmartDate(i++));
                LoadProperty(ModifiedByProperty, sdr.GetInt32(i++));
            }

            MarkAsChild();
            MarkOld();
            BusinessRules.CheckRules();
        }
Exemple #12
0
 private void FetchObject(SafeDataReader dr)
 {
     _id           = dr.GetGuid("Id");
     _templateId   = dr.GetGuid("TemplateId");
     _title        = dr.GetString("Title");
     _body         = dr.GetString("Body");
     _subject      = dr.GetString("Subject");
     _isActive     = dr.GetBoolean("IsActive");
     _userData1    = dr.GetString("UserData1");
     _userData2    = dr.GetString("UserData2");
     _userData3    = dr.GetString("UserData3");
     _dateCreated  = dr.GetSmartDate("DateCreated", _dateCreated.EmptyIsMin);
     _dateModified = dr.GetSmartDate("DateModified", _dateModified.EmptyIsMin);
     _isInvitation = dr.GetBoolean("IsInvitation");
     _isDelete     = dr.GetBoolean("IsDelete");
 }
Exemple #13
0
 private void Fetch(SafeDataReader dr)
 {
     Database.LogInfo("OrderOrderDetail.FetchDR", GetHashCode());
     try
     {
         _ProductID               = dr.GetInt32("ProductID");
         _UnitPrice               = dr.GetDecimal("UnitPrice");
         _Quantity                = dr.GetInt16("Quantity");
         _Discount                = dr.GetFloat("Discount");
         _Product_ProductName     = dr.GetString("Product_ProductName");
         _Product_SupplierID      = (int?)dr.GetValue("Product_SupplierID");
         _Product_CategoryID      = (int?)dr.GetValue("Product_CategoryID");
         _Product_QuantityPerUnit = dr.GetString("Product_QuantityPerUnit");
         _Product_UnitPrice       = (decimal?)dr.GetValue("Product_UnitPrice");
         _Product_UnitsInStock    = (Int16?)dr.GetValue("Product_UnitsInStock");
         _Product_UnitsOnOrder    = (Int16?)dr.GetValue("Product_UnitsOnOrder");
         _Product_ReorderLevel    = (Int16?)dr.GetValue("Product_ReorderLevel");
         _Product_Discontinued    = dr.GetBoolean("Product_Discontinued");
     }
     catch (Exception ex)             // FKItem Fetch
     {
         Database.LogException("OrderOrderDetail.FetchDR", ex);
         throw new DbCslaException("OrderOrderDetail.Fetch", ex);
     }
     MarkOld();
 }
        protected void Fetch(SafeDataReader sdr)
        {
            using (BypassPropertyChecks)
            {
                int i = 0;
                LoadProperty(UserIDProperty, sdr.GetInt32(i++));
                LoadProperty(FirstNameProperty, sdr.GetString(i++));
                LoadProperty(LastNameProperty, sdr.GetString(i++));
                LoadProperty(UserNameProperty, sdr.GetString(i++));
                LoadProperty(PasswordProperty, sdr.GetValue(i++));
                LoadProperty(SaltProperty, sdr.GetValue(i++));
                LoadProperty(RFIDProperty, sdr.GetString(i++));
                LoadProperty(PasswordChangeDateProperty, sdr.GetValue(i++));
                LoadProperty(CreatedDateProperty, sdr.GetDateTime(i++));
                LoadProperty(CreatedByProperty, sdr.GetInt32(i++));
                LoadProperty(FirstTimeLoginProperty, sdr.GetBoolean(i++));
                LoadProperty(EmailAddressProperty, sdr.GetString(i++));
                LoadProperty(DeductIDProperty, Singular.Misc.ZeroNothing(sdr.GetInt32(i++)));
                LoadProperty(ResetStateProperty, sdr.GetInt32(i++));
            }

            MarkAsChild();
            MarkOld();
            BusinessRules.CheckRules();
        }
Exemple #15
0
        private void DataPortal_Fetch(int id)
        {
            using (var ctx = ConnectionManager <SqlConnection> .GetManager(ConfigHelper.GetDatabase(), false))
            {
                using (var cmd = ctx.Connection.CreateCommand())
                {
                    cmd.CommandText = @"SELECT item,itemcode,itemname,shortdescription,arrastremtrate,arrastrertrate,premiumrate,
                                    stevedoringmtrate,stevedoringrtrate,rtmultiplier,istaxwithheld
                          FROM item
                          WHERE item = @id";
                    cmd.Parameters.AddWithValue("@id", id);

                    using (var dr = new SafeDataReader(cmd.ExecuteReader()))
                    {
                        if (dr.Read())
                        {
                            LoadProperty(_Id, dr.GetInt32("item"));
                            LoadProperty(_Code, dr.GetString("itemcode"));
                            LoadProperty(_Name, dr.GetString("itemname"));
                            LoadProperty(_ShortDescription, dr.GetString("shortdescription"));
                            LoadProperty(_ArrastreMTRate, dr.GetDecimal("arrastremtrate"));
                            LoadProperty(_ArrastreRTRate, dr.GetDecimal("arrastrertrate"));
                            LoadProperty(_StevedoringMTRate, dr.GetDecimal("stevedoringmtrate"));
                            LoadProperty(_StevedoringRTRate, dr.GetDecimal("stevedoringrtrate"));
                            LoadProperty(_PremiumRate, dr.GetDecimal("premiumrate"));
                            LoadProperty(_RTMultiplier, dr.GetDecimal("rtmultiplier"));
                            LoadProperty(_IsTaxWithHeld, dr.GetBoolean("istaxwithheld"));
                        }
                    }
                }
            }
            ChildFetch();
        }
Exemple #16
0
 private void FetchObject(SafeDataReader dr)
 {
     _id                               = dr.GetGuid("Id");
     _registrationId                   = dr.GetGuid("RegistrationId");
     _amount                           = dr.GetDecimal("Amount");
     _fee                              = dr.GetDecimal("Fee");
     _tax                              = dr.GetDecimal("Tax");
     _grandAmount                      = dr.GetDecimal("GrandAmount");
     _payGroupId                       = dr.GetGuid("PayGroupId");
     _paymentMethod                    = dr.GetString("PaymentMethod");
     _payCompany                       = dr.GetString("PayCompany");
     _payAddress1                      = dr.GetString("PayAddress1");
     _payAddress2                      = dr.GetString("PayAddress2");
     _payCity                          = dr.GetString("PayCity");
     _payPostal                        = dr.GetString("PayPostal");
     _payCountry                       = dr.GetString("PayCountry");
     _payFirstname                     = dr.GetString("PayFirstname");
     _payLastname                      = dr.GetString("PayLastname");
     _payContact                       = dr.GetString("PayContact");
     _payStatus                        = dr.GetString("PayStatus");
     _amountReceived                   = dr.GetDecimal("AmountReceived");
     _isReminded                       = dr.GetBoolean("IsReminded");
     _lastSendPaidEmailDate            = dr.GetSmartDate("LastSendPaidEmailDate", _lastSendPaidEmailDate.EmptyIsMin);
     _lastSendPaymentReminderEmailDate = dr.GetSmartDate("LastSendPaymentReminderEmailDate", _lastSendPaymentReminderEmailDate.EmptyIsMin);
     _invoiceDate                      = dr.GetSmartDate("InvoiceDate", _invoiceDate.EmptyIsMin);
     _dateCreated                      = dr.GetSmartDate("DateCreated", _dateCreated.EmptyIsMin);
     _dateModified                     = dr.GetSmartDate("DateModified", _dateModified.EmptyIsMin);
     _invoice                          = dr.GetString("Invoice");
 }
Exemple #17
0
        private UserDto Fetch(IDataReader data)
        {
            var user = new UserDto();

            using (var dr = new SafeDataReader(data))
            {
                if (dr.Read())
                {
                    user.Id                                          = dr.GetInt64("id");
                    user.User_name                                   = dr.GetString("user_name");
                    user.Password                                    = dr.GetString("password");
                    user.Password_salt                               = dr.GetString("password_salt");
                    user.Password_question                           = !dr.IsDBNull("password_question") ? dr.GetString("password_question") : null;
                    user.Password_answer                             = !dr.IsDBNull("password_answer") ? dr.GetString("password_answer") : null;
                    user.Is_approved                                 = dr.GetBoolean("is_approved");
                    user.Fullname                                    = dr.GetString("fullname");
                    user.Email                                       = dr.GetString("email");
                    user.Tel                                         = !dr.IsDBNull("tel") ? dr.GetString("tel") : null;
                    user.Last_login_date                             = dr.GetSmartDate("last_login_date", true);
                    user.Last_password_changed_date                  = dr.GetSmartDate("last_password_changed_date", true);
                    user.Last_lockout_date                           = dr.GetSmartDate("last_lockout_date", true);
                    user.Failed_password_attempt_count               = dr.GetInt64("failed_password_attempt_count");
                    user.Failed_password_attempt_window_start        = dr.GetSmartDate("failed_password_attempt_window_start", true);
                    user.Failed_password_answer_attempt_count        = dr.GetInt64("failed_password_answer_attempt_count");
                    user.Failed_password_answer_attempt_window_start = dr.GetSmartDate("failed_password_answer_attempt_window_start", true);
                    user.Birthday                                    = !dr.IsDBNull("birthday") ? dr.GetSmartDate("birthday", true) : null;
                    user.Address                                     = !dr.IsDBNull("address") ? dr.GetString("address") : null;
                    user.Website                                     = !dr.IsDBNull("website") ? dr.GetString("website") : null;
                    user.Avatar                                      = !dr.IsDBNull("avatar") ? dr.GetString("avatar") : null;
                    user.Is_lock                                     = dr.GetBoolean("is_lock");
                    user.User_type                                   = (Int64?)dr.GetValue("user_type");
                    user.Last_modified                               = dr.GetSmartDate("last_modified", true);
                    user.Last_username                               = dr.GetString("Last_username");
                }
                dr.NextResult();
                while (dr.Read())
                {
                    string item = dr.GetInt64("id").ToString();
                    if (user.Roles == null)
                    {
                        user.Roles = new List <string>();
                    }
                    user.Roles.Add(item);
                }
            }
            return(user);
        }
Exemple #18
0
        /// <summary>
        /// Loads a <see cref="CircInfo"/> object from the given SafeDataReader.
        /// </summary>
        /// <param name="dr">The SafeDataReader to use.</param>
        private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(CircIDProperty, dr.GetInt32("CircID"));
            LoadProperty(DocIDProperty, (int?)dr.GetValue("DocID"));
            LoadProperty(FolderIDProperty, (int?)dr.GetValue("FolderID"));
            LoadProperty(NeedsReplyProperty, dr.GetBoolean("NeedsReply"));
            LoadProperty(NeedsReplyDecisionProperty, dr.GetBoolean("NeedsReplyDecision"));
            LoadProperty(CircTypeTagProperty, dr.GetString("CircTypeTag"));
            LoadProperty(SenderEntityIDProperty, (int?)dr.GetValue("SenderEntityID"));
            LoadProperty(SentDateTimeProperty, dr.IsDBNull("SentDateTime") ? null : dr.GetSmartDate("SentDateTime", true));
            LoadProperty(DaysToReplyProperty, dr.GetInt16("DaysToReply"));
            LoadProperty(DaysToLiveProperty, dr.GetInt16("DaysToLive"));
            var args = new DataPortalHookArgs(dr);

            OnFetchRead(args);
        }
Exemple #19
0
 private void DataPortal_Fetch(Criteria criteria)
 {
     using (SqlConnection cn = new SqlConnection(Database.ConnectionString))
     {
         cn.Open();
         using (SqlCommand cm = cn.CreateCommand())
         {
             cm.CommandType = CommandType.StoredProcedure;
             cm.CommandText = "app_member.member_get";
             cm.Parameters.AddWithValue("@id", criteria.code);
             using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
             {
                 dr.Read();
                 _id             = dr.GetInt32("id");
                 _firstName      = dr.GetString("first_name");
                 _lastName       = dr.GetString("last_name");
                 _enFirstName    = dr.GetString("en_first_name");
                 _enLastName     = dr.GetString("en_last_name");
                 _email          = dr.GetString("email");
                 _cell           = dr.GetString("cell");
                 _addressId      = dr.GetInt32("address_id");
                 _sex            = dr.GetBoolean("sex");
                 _marriage       = dr.GetBoolean("married");
                 _regDate        = dr.GetSmartDate("regdate", _regDate.EmptyIsMin);
                 _statusDate     = dr.GetSmartDate("statuschanged", _statusDate.EmptyIsMin);
                 _status         = dr.GetInt32("statuscode");
                 _familyName     = dr.GetString("familyName");
                 _familyCode     = dr.GetInt32("family_code");
                 _baptismId      = dr.GetInt32("baptism_id");
                 _baptismyear    = dr.GetSmartDate("baptism_year");
                 _birthday       = dr.GetSmartDate("birthday", _birthday.EmptyIsMin);
                 _entrytypeId    = dr.GetInt32("entrytype");
                 _job            = dr.GetString("job");
                 _work           = dr.GetString("work_phone");
                 _cellName       = dr.GetString("cellname");
                 _subDivId       = dr.GetInt32("subdiv_id");
                 _jobtype        = dr.GetInt32("jobtype");
                 _fellowshipName = dr.GetString("fellowshipname");
                 _relationshipId = (int)dr.GetByte("family_relationship");
                 _ministryName   = dr.GetString("ministry");
                 dr.GetBytes("lastChanged", 0, _lastchanged, 0, 8);
             }
         }
         _username = Dothan.ApplicationContext.User.Identity.Name;
     }
 }
 private void DataPortal_Fetch(SafeDataReader criteria)
 {
     Rol          = criteria.GetString("NombreRol");
     CodigoOpcion = criteria.GetString("CodigoOpcion");
     Opcion       = criteria.GetString("NombreOpcion");
     Nivel        = criteria.GetInt32("Nivel");
     Conceder     = criteria.GetBoolean("Conceder");
 }
Exemple #21
0
        private void FetchObject(SafeDataReader dr)
        {
            _id                 = dr.GetGuid("Id");
            _name               = dr.GetString("Name");
            _loginId            = dr.GetString("LoginId");
            _password           = dr.GetString("Password");
            _access             = dr.GetString("Access");
            _LogPassword        = dr.GetString("LogPassword");
            _dateLastLogin      = dr.GetSmartDate("DateLastLogin", _dateLastLogin.EmptyIsMin);
            _dateCreated        = dr.GetSmartDate("DateCreated", _dateCreated.EmptyIsMin);
            _isActive           = dr.GetBoolean("IsActive");
            _dateModified       = dr.GetSmartDate("DateModified", _dateModified.EmptyIsMin);
            _LastChangePassword = dr.GetSmartDate("LastChangePassword", _LastChangePassword.EmptyIsMin);

            _IsExpired = dr.GetBoolean("IsExpired");
            _IsLooked  = dr.GetBoolean("IsLooked");
        }
Exemple #22
0
 private void FetchObject(SafeDataReader dr)
 {
     Id                                    = dr.GetString("UserName");
     PasswordHash                          = dr.GetString("Password");
     IsActive                              = dr.GetBoolean("IsActive");
     IsAutoUser                            = dr.GetBoolean("IsAutoUser");
     MustChangePassword                    = dr.GetBoolean("MustChangePassword");
     FkUserprofile                         = dr.GetInt32("fk_UserProfile");
     Email                                 = dr.GetString("Email");
     EmailConfirmed                        = dr.GetBoolean("EmailConfirmed");
     PhoneNumber                           = dr.GetString("PhoneNumber");
     PhoneNumberConfirmed                  = dr.GetBoolean("PhoneNumberConfirmed");
     _createdDate                          = dr.GetSmartDate("CreatedDate", _createdDate.EmptyIsMin);
     _createdDate.FormatString             = "g";
     _lastLoginDate                        = dr.GetSmartDate("LastLoginDate", _lastLoginDate.EmptyIsMin);
     _lastLoginDate.FormatString           = "g";
     _lastPasswordChangedDate              = dr.GetSmartDate("LastPasswordChangedDate", _lastPasswordChangedDate.EmptyIsMin);
     _lastPasswordChangedDate.FormatString = "g";
     _lastLockoutDate                      = dr.GetSmartDate("LastLockoutDate", _lastLockoutDate.EmptyIsMin);
     _lastLockoutDate.FormatString         = "g";
     FailedPasswordAttemptCount            = dr.GetInt32("FailedPasswordAttemptCount");
     Comment                               = dr.GetString("Comment");
     Position                              = dr.GetString("Position");
     FirstName                             = dr.GetString("FirstName");
     MiddleName                            = dr.GetString("MiddleName");
     LastName                              = dr.GetString("LastName");
     LockoutEnabled                        = dr.GetBoolean("LockoutEnabled");
     TwoFactorEnabled                      = dr.GetBoolean("TwoFactorEnabled");
     SecurityStamp                         = dr.GetString("SecurityStamp");
     _lockoutEndDateUtc                    = dr.GetSmartDate("LockoutEndDateUtc", _lockoutEndDateUtc.EmptyIsMin);
     _lockoutEndDateUtc.FormatString       = "g";
 }
Exemple #23
0
 private void FetchObject(SafeDataReader dr)
 {
     _id               = dr.GetGuid("Id");
     _panelId          = dr.GetString("PanelId");
     _categoryPSDetail = dr.GetString("CategoryPSDetail");
     _orderNo          = dr.GetInt32("OrderNo");
     _isActive         = dr.GetBoolean("IsActive");
     _round            = dr.GetString("Round");
 }
Exemple #24
0
 private void FetchObject(SafeDataReader dr)
 {
     _id            = dr.GetGuid("Id");
     _entryId       = dr.GetGuid("EntryId");
     _remarks       = dr.GetString("Remarks");
     _dateCreated   = dr.GetSmartDate("DateCreated", _dateCreated.EmptyIsMin);
     _isAdmin       = dr.GetBoolean("isAdmin");
     _commentatorID = dr.GetGuid("CommentatorID");
 }
Exemple #25
0
        protected void Fetch(SafeDataReader sdr)
        {
            int i = 0;

            LoadProperty(QuestionnaireAnswerSetIDProperty, sdr.GetInt32(i++));
            LoadProperty(METTReportingNameProperty, sdr.GetString(i++));
            LoadProperty(OfficialNameProperty, sdr.GetString(i++));
            LoadProperty(OrganisationNameProperty, sdr.GetString(i++));
            LoadProperty(LegalDesignationProperty, sdr.GetString(i++));
            LoadProperty(LeadAssessorIDProperty, Singular.Misc.ZeroNothing(sdr.GetInt32(i++)));
            LoadProperty(AuditedByProperty, sdr.GetInt32(i++));
            LoadProperty(AssessmentStepProperty, sdr.GetString(i++));
            LoadProperty(AssessmentStepIdProperty, sdr.GetInt32(i++));
            LoadProperty(IsUnofficialProtectedAreaIndProperty, sdr.GetBoolean(i++));
            LoadProperty(AcceptedIndProperty, sdr.GetBoolean(i++));
            LoadProperty(CreatedDateTimeProperty, sdr.GetDateTime(i++));
            LoadProperty(ModifiedDateTimeProperty, sdr.GetDateTime(i++));
        }
Exemple #26
0
        internal FamilyInfo(SafeDataReader dr)
        {
            _id         = dr.GetInt32("id");
            _first_name = dr.GetString("first_name");
            _last_name  = dr.GetString("last_name");
            _en_first   = dr.GetString("en_first_name");
            _en_last    = dr.GetString("en_last_name");

            _age = dr.GetInt32("age");

            if (dr.GetBoolean("sex"))
            {
                _sex = Resources.Male.ToString();
            }
            else
            {
                _sex = Resources.Female.ToString();
            }

            if (dr.GetBoolean("married"))
            {
                _marrige = Resources.Married;
            }
            else
            {
                _marrige = Resources.Single;
            }

            _relastionship     = dr.GetString("relationship");
            _relastionshipcode = (int)dr.GetByte("family_relationship");
            _baptismname       = dr.GetString("baptismName");

            _subdivision = dr.GetString("SubDivisionName");
            _familycode  = dr.GetInt32("family_code");
            _statusname  = dr.GetString("StatusName");
            if (dr.GetBoolean("active"))
            {
                _active = Resources.Active;
            }
            else
            {
                _active = Resources.InActive;
            }
        }
        /// <summary>
        /// Loads a <see cref="PropertyRequiredInfo"/> object from the given SafeDataReader.
        /// </summary>
        /// <param name="dr">The SafeDataReader to use.</param>
        private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(ObjectNameProperty, dr.GetString("ObjectName"));
            LoadProperty(NameProperty, dr.GetString("Name"));
            LoadProperty(IsRequiredProperty, dr.GetBoolean("IsRequired"));
            var args = new DataPortalHookArgs(dr);

            OnFetchRead(args);
        }
Exemple #28
0
 internal MessageInfo(SafeDataReader dr)
 {
     Id        = dr.GetInt32("Id");
     MessageId = dr.GetInt32("MessageId");
     Title     = dr.GetString("Title");
     Content   = dr.GetString("Content");
     Replay    = dr.GetString("Replay");
     IsConfirm = dr.GetBoolean("IsConfirm");
     CreatedOn = dr.GetDateTime("CreateOn");
 }
        /// <summary>
        /// Reads the extra OETIdentity class properties from the data reader
        /// </summary>
        /// <param name="safeDataReader">Data reader containing the additional properties</param>
        /// <param name="startIndex">Index to start reading from</param>
        protected override void ReadExtraProperties(SafeDataReader safeDataReader, ref int startIndex)
        {
            base.ReadExtraProperties(safeDataReader, ref startIndex);

            this.emailAddress   = safeDataReader.GetString(startIndex);
            this.firstTimeLogin = safeDataReader.GetBoolean(startIndex + 1);
            // Implement these columns in the Stored Procedure if you need them
            this.resetState = (ResetState)safeDataReader.GetInt32(startIndex + 2);
            // this.firstName = safeDataReader.GetString(startIndex + 3);
        }
        /// <summary>
        /// Loads a <see cref="DocClassInfo"/> object from the given SafeDataReader.
        /// </summary>
        /// <param name="dr">The SafeDataReader to use.</param>
        private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(DocClassIDProperty, dr.GetInt32("DocClassID"));
            LoadProperty(DocClassNameProperty, dr.GetString("DocClassName"));
            LoadProperty(IsActiveProperty, dr.GetBoolean("IsActive"));
            var args = new DataPortalHookArgs(dr);

            OnFetchRead(args);
        }