/// <summary>
        /// reads the column values from a datareader and populates the object properties
        /// </summary>
        /// <param name="reader"></param>
        public override void Load(MySqlDataReader reader)
        {
            this.Code               = Preparer.SafeString(reader["ap_code"]);
            this.Description        = Preparer.SafeString(reader["ap_description"]);
            this.SendNotification   = Preparer.SafeBool(reader["ap_send_notification"]);
            this.ChangeStatusTo     = Preparer.SafeString(reader["ap_change_status_to"]);
            this.PermissionRequired = Preparer.SafeInt(reader["ap_permission_required"]);

            // Get all associated roles for this attachment purpose
            AttachmentRole          ardao  = new AttachmentRole(this.phreezer);
            AttachmentRolesCriteria arcrit = new AttachmentRolesCriteria();

            arcrit.AttachmentPurposeCode = reader["ap_code"].ToString();
            AttachmentRoles aroles = ardao.GetAttachmentRoles(arcrit);

            IEnumerator   i  = aroles.GetEnumerator();
            StringBuilder sb = new StringBuilder();

            // put roles into a comma-delimited list
            while (i.MoveNext())
            {
                AttachmentRole r = (AttachmentRole)i.Current;
                sb.Append(r.RoleDescription + ", ");
            }

            // trim off comma at the end
            if (sb.Length > 2)
            {
                sb.Length = sb.Length - 2;
            }

            this.Roles = Preparer.SafeString(sb.ToString());

            this.OnLoad(reader);
        }
Example #2
0
        /// <summary>
        /// reads the column values from a datareader and populates the object properties
        /// </summary>
        /// <param name="reader"></param>
        public override void Load(MySqlDataReader reader)
        {
            this.Code             = Preparer.SafeString(reader["os_code"]);
            this.Description      = Preparer.SafeString(reader["os_description"]);
            this.PermissionBit    = Preparer.SafeInt(reader["os_permission_bit"]);
            this.InternalExternal = Preparer.SafeBool(reader["os_internal_external"]);
            this.IsClosed         = Preparer.SafeBool(reader["os_is_closed"]);

            this.OnLoad(reader);
        }
Example #3
0
        /// <summary>
        /// reads the column values from a datareader and populates the object properties
        /// </summary>
        /// <param name="reader"></param>
        public override void Load(MySqlDataReader reader)
        {
            this.Code          = Preparer.SafeString(reader["rt_code"]);
            this.Description   = Preparer.SafeString(reader["rt_description"]);
            this.ExportFormats = Preparer.SafeString(reader["rt_export_formats"]);
            this.Definition    = Preparer.SafeString(reader["rt_definition"]);
            this.IsActive      = Preparer.SafeBool(reader["rt_is_active"]);

            this.OnLoad(reader);
        }
Example #4
0
        /// <summary>
        /// reads the column values from a datareader and populates the object properties
        /// </summary>
        /// <param name="reader"></param>
        public override void Load(MySqlDataReader reader)
        {
            this.Id = Preparer.SafeInt(reader["r_id"]);
            this.RequestTypeCode = Preparer.SafeString(reader["r_request_type_code"]);
            this.OrderId         = Preparer.SafeInt(reader["r_order_id"]);
            this.OriginatorId    = Preparer.SafeInt(reader["r_originator_id"]);
            this.Created         = Preparer.SafeDateTime(reader["r_created"]);
            this.StatusCode      = Preparer.SafeString(reader["r_status_code"]);
            this.Xml             = Preparer.SafeString(reader["r_xml"]);
            this.IsCurrent       = Preparer.SafeBool(reader["r_is_current"]);
            this.Note            = Preparer.SafeString(reader["r_note"]);

            this.OnLoad(reader);
        }