示例#1
0
 public void SaveTranslation(Translation translation)
 {
     var phrase = _repo.Get(translation.TransId);
     if(phrase != null)
     {
         phrase.Spanish = translation.Spanish;
         phrase.TransBy = translation.TransBy;
         if(translation.TransBy != null)phrase.TransDate = DateTime.Now;
         phrase.BlockedBy = null;
         phrase.BlockedTime = null;
         phrase.CheckedBy = translation.CheckedBy;
         if(translation.CheckedBy != null) phrase.CheckedTime = DateTime.Now;
         phrase.RejectedBy = translation.RejectedBy;
         if(translation.RejectedBy != null) phrase.RejectedTime = DateTime.Now;
         phrase.Comment = translation.Comment;
     }
     _repo.Update(phrase);
     _repo.SaveChanges();
 }
示例#2
0
 public void Post(Translation translation)
 {
     _translations.SaveTranslation(translation);
 }