partial void UpdateTranslate(Translate instance);
partial void DeleteTranslate(Translate instance);
private void detach_Translate(Translate entity) { this.SendPropertyChanging(); entity.languages = null; }
partial void InsertTranslate(Translate instance);
private void attach_Translate(Translate entity) { this.SendPropertyChanging(); entity.languages = this; }
private void detach_Translate(Translate entity) { this.SendPropertyChanging(); entity.Phrase = null; }
private void attach_Translate(Translate entity) { this.SendPropertyChanging(); entity.Phrase = this; }
public ActionResult EditTranslate(Translate model) { dbDataContext db = new dbDataContext(); Translate rec = db.Translate.SingleOrDefault(c => c.ID == model.ID); if (rec == null) return RedirectToAction("TranslateList"); rec.LanguageID = Int32.Parse(Request["Lang"]); rec.PhraseID = Int32.Parse(Request["Phrase"]); rec.Translation = model.Translation; db.SubmitChanges(); return RedirectToAction("TranslateList"); }
public ActionResult CreateTranslate(Translate model) { dbDataContext db = new dbDataContext(); Translate rec = new Translate(); rec.LanguageID = Int32.Parse(Request["languages"]); rec.PhraseID = Int32.Parse(Request["phrases"]); rec.Translation = model.Translation; db.Translate.InsertOnSubmit(rec); db.SubmitChanges(); return RedirectToAction("TranslateList"); }