protected void Page_PreRender(object sender, EventArgs e) { TradosDataContext db = Machines.getTradosContext(false); int[] sentIds = Request["sentIds"].Split(',').Select(w => int.Parse(w)).ToArray(); //prvni veta var sp = db.Sentences.Where(s => s.Id == sentIds[0]).Select(s => new { sent = s, page = s.Page }).Single(); page = sp.page; firstSent = sp.sent; //seznam exportCmlItem SentenceRep.DataSource = TradosLib.ExportXmlItems(db, page, (Langs)firstSent.SrcLang, (Langs)firstSent.TransLang, null). Where(it => sentIds.Contains(it.Id)).Select(it => new { it.Id, it.Name, TransText = errorTranstext.ContainsKey(it.Id) ? errorTranstext[it.id] : string.IsNullOrEmpty(it.TransText) ? null : HttpUtility.HtmlDecode(it.TransText.Replace(TradosLib.crlfCode, "\r\n")), OldSrcText = it.OldSrcText, NewSrcText = it.NewSrcText, it.newSrcId, ActCmd = it.actCmd.ToString() }).ToArray(); SentenceRep.DataBind(); }
partial void UpdatePage(Page instance);
partial void DeletePage(Page instance);
partial void InsertPage(Page instance);