|
@@ -126,22 +126,23 @@ namespace PRSDesktop
|
|
|
private void KanbanAfterSave(IDynamicEditorForm form, Kanban[] items)
|
|
|
{
|
|
|
Progress.Show("Saving documents");
|
|
|
- JobRequisition jobrequi = SelectedRows.FirstOrDefault().ToObject<JobRequisition>();
|
|
|
- CoreTable table = new Client<JobRequisitionDocument>().Query(new Filter<JobRequisitionDocument>(x => x.EntityLink.ID).IsEqualTo(jobrequi.ID),
|
|
|
- new Columns<JobRequisitionDocument>(x => x.DocumentLink.ID, x => x.DocumentLink.FileName));
|
|
|
+ var jobrequi = SelectedRows.FirstOrDefault().ToObject<JobRequisition>();
|
|
|
+ var table = Client.Query(
|
|
|
+ new Filter<JobRequisitionDocument>(x => x.EntityLink.ID).IsEqualTo(jobrequi.ID),
|
|
|
+ new Columns<JobRequisitionDocument>(x => x.DocumentLink.ID));
|
|
|
if (table.Rows.Any())
|
|
|
{
|
|
|
- List<KanbanDocument> docs = new List<KanbanDocument>();
|
|
|
- foreach (CoreRow row in table.Rows)
|
|
|
+ var docs = new List<KanbanDocument>();
|
|
|
+ foreach (var row in table.Rows)
|
|
|
{
|
|
|
- KanbanDocument doc = new KanbanDocument();
|
|
|
- doc.DocumentLink.ID = Guid.Parse(row.Values[0].ToString());
|
|
|
- if (row.Values[1] != null)
|
|
|
- doc.DocumentLink.FileName = row.Values[1].ToString();
|
|
|
+ var doc = new KanbanDocument();
|
|
|
+
|
|
|
+ doc.DocumentLink.ID = row.Get<JobRequisitionDocument, Guid>(x => x.DocumentLink.ID);
|
|
|
doc.EntityLink.ID = items[0].ID;
|
|
|
+
|
|
|
docs.Add(doc);
|
|
|
}
|
|
|
- new Client<KanbanDocument>().Save(docs, "Created From Job Requi Screen");
|
|
|
+ Client.Save(docs, "Created From Job Requi Screen");
|
|
|
}
|
|
|
Progress.Close();
|
|
|
}
|