示例#1
0
 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();
 }
示例#2
0
 partial void UpdatePage(Page instance);
示例#3
0
 partial void DeletePage(Page instance);
示例#4
0
 partial void InsertPage(Page instance);