Ejemplo n.º 1
0
 private static void DelegateEvent(IWfBox box, DataRow[] rows, IDictionary<string, WorkItem> workItems, WfClientAPIHandler handle)
 {
     handle(workItems);
     box.DeleteRows(rows);
 }
Ejemplo n.º 2
0
 public static void DelegateEvent(IWfBox box, WfClientAPIHandler handle, string[] batchField)
 {
     DataRow[] selectedRows = box.GetSelectedRows(batchField);
     if (selectedRows.Length > 0)
     {
         IDictionary<string, WorkItem> workItems = GetWorkItems(selectedRows, box.IdField);
         DelegateEvent(box, selectedRows, workItems, handle);
     }
 }
Ejemplo n.º 3
0
 private static void DelegateEvent(IWfBox box, DataRow row, WfClientAPIHandler handle, string idField)
 {
     WorkItem workItem = GetWorkItem(row, idField);
     Dictionary<string, WorkItem> workItems = new Dictionary<string, WorkItem>(1);
     workItems.Add(workItem.Id, workItem);
     handle(workItems);
     box.DeleteRows(new DataRow[] { row });
 }
Ejemplo n.º 4
0
 public static void DelegateEvent(WorkItem workItem, WfClientAPIHandler handle)
 {
     Dictionary<string, WorkItem> workItems = new Dictionary<string, WorkItem>(1);
     workItems.Add(workItem.Id, workItem);
     handle(workItems);
 }
Ejemplo n.º 5
0
 public static void DelegateEvent(Dictionary<string, WorkItem> sl, WfClientAPIHandler handle)
 {
     handle(sl);
 }
Ejemplo n.º 6
0
 public static void DelegateEvent(IWfBox box, WfClientAPIHandler handle)
 {
     DelegateEvent(box, handle, null);
 }
Ejemplo n.º 7
0
 public static void DelegateEvent(IWfBox box, IWfDialog wfDlg, WfClientAPIHandler handle, string[] batchField)
 {
     try
     {
         DataRowView[] selectedRows = GetSelectedRows(box.DataSource as DataView, batchField);
         IDictionary<string, WorkItem> workItems = GetWorkItems(box, selectedRows);
         IEnumerator<KeyValuePair<string, WorkItem>> enumerator = workItems.GetEnumerator();
         enumerator.MoveNext();
         KeyValuePair<string, WorkItem> current = enumerator.Current;
         wfDlg.WorkItem = current.Value;
         if (wfDlg.ShowDialog() == DialogResult.OK)
         {
             WfLogicalAbnormalContextData contextData = new WfLogicalAbnormalContextData();
             wfDlg.SetContextData(contextData);
             WfUtil.SetAbnormalContextData(contextData);
             DelegateEvent(selectedRows, workItems, handle);
             WfUtil.FreeAbnormalContextData();
         }
     }
     finally
     {
         wfDlg.Close();
     }
 }
Ejemplo n.º 8
0
 public static void DelegateEvent(IWfBox box, IWfDialog wfDlg, WfClientAPIHandler handle)
 {
     DelegateEvent(box, wfDlg, handle, null);
 }
Ejemplo n.º 9
0
 public static void DelegateEvent(IWfBox box, DataRowView row, WfClientAPIHandler handle)
 {
     WorkItem workItem = GetWorkItem(row, box);
     Dictionary<string, WorkItem> workItems = new Dictionary<string, WorkItem>(1);
     workItems.Add(workItem.Id, workItem);
     handle(workItems);
     if (row.Row.RowState != DataRowState.Deleted)
     {
         row.Delete();
     }
 }
Ejemplo n.º 10
0
 public static void DelegateEvent(IWfBox box, WfClientAPIHandler handle, string[] batchField)
 {
     DataRowView[] selectedRows = GetSelectedRows(box.DataSource as DataView, batchField);
     IDictionary<string, WorkItem> workItems = GetWorkItems(box, selectedRows);
     DelegateEvent(selectedRows, workItems, handle);
 }