Exemplo n.º 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();
 }
Exemplo n.º 2
0
 partial void DeleteSentence(Sentence instance);
Exemplo n.º 3
0
 partial void UpdateSentence(Sentence instance);
Exemplo n.º 4
0
 partial void InsertSentence(Sentence instance);
Exemplo n.º 5
0
		private void detach_Sentences(Sentence entity)
		{
			this.SendPropertyChanging();
			entity.Page = null;
		}
Exemplo n.º 6
0
		private void attach_Sentences(Sentence entity)
		{
			this.SendPropertyChanging();
			entity.Page = this;
		}