Пример #1
0
        public override void MapFromTableRow(DataRow row)
        {
            try
            {
                this.Id                  = row["Id"].ToString();
                this.FirstName           = row["FirstName"].ToString();
                this.LastName            = row["LastName"].ToString();
                this.Email               = row["Email"].ToString();
                this.Gender              = row["Gender"].ToString();
                this.MaritalStatus       = row["MaritalStatus"].ToString();
                this.AgeRange            = row["AgeRange"].ToString();
                this.Education           = row["Education"].ToString();
                this.NearestIntersection = row["NearestIntersection"].ToString();
                this.PostalCode          = row["PostalCode"].ToString();
                this.ConsentToContact    = (bool)row["ConsentToContact"];
                this.DateCreated         = (DateTime)row["DateCreated"];
                this.LastModified        = (DateTime)row["LastModified"];
                this.Status              = row["Status"].ToString();
                this.IsImmigrant         = (bool)row["IsImmigrant"];
                this.Picture             = row["Picture"].ToString();
                this.PictureName         = row["Picture"].ToString();
            }
            catch (Exception e)
            {
                //throw;
                this.isValid = false;
                this.sMsgError.Add("Error:  UserDetails.MapFromTableRow.");
                this.sMsgError.Add(e.Message);
                return;
            }

            ImageControl ImgCtrl = new ImageControl();

            //this.Picture = this.AdjustImageFile("users", this.Id);
            this.Picture = ImageContainer.RetrieveImagePath("users", this.Picture);
            this.Validate();
        }