Ejemplo n.º 1
0
 public long InsertAboutMe(tbl_AboutMe about)
 {
     about.CreatedDate = DateTime.Now;
     about.MetaTitle   = XuLyChuoi.GetMetaTitle(about.Title);
     db.tbl_AboutMe.Add(about);
     return(about.ID);
 }
Ejemplo n.º 2
0
 public bool Update(tbl_AboutMe aboutMe)
 {
     try
     {
         var about = db.tbl_AboutMe.Find(aboutMe.ID);
         about.FirstName    = aboutMe.FirstName;
         about.LastName     = aboutMe.LastName;
         about.Title        = aboutMe.Title;
         about.MetaTitle    = XuLyChuoi.GetMetaTitle(about.Title);
         about.Introduce    = aboutMe.Introduce;
         about.Image        = aboutMe.Image;
         about.MoreImage    = aboutMe.MoreImage;
         about.ModifiedDate = DateTime.Now;
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }