private void ManageStageAutoDocuments_Load(object sender, EventArgs e) { try { SBFAApi agent = new SBFAApi(); using (new OperationContextScope(agent.context)) { lstDocuments.Items.Clear(); sbfa.WorkFlowStagesAutoDocuments[] response = agent.operation.GetWorkFlowStagesAutoDocuments(ManageStages.currentWorkFlowStage); foreach (sbfa.WorkFlowStagesAutoDocuments wrkFlow in response) { string[] row = { wrkFlow.Id.ToString(), wrkFlow.FK_AutoDocumentName, ((wrkFlow.SendEmail) == -1 ? "No" : ((wrkFlow.SendEmail) == 0 ? "On Enter" : "On Leave")), ((wrkFlow.SendSMS) == -1 ? "No" : ((wrkFlow.SendSMS) == 0 ? "On Enter" : "On Leave")) }; var listViewItem = new ListViewItem(row); lstDocuments.Items.Add(listViewItem); } } Globals.SetStageMessagingPickList(cmbEmail); Globals.SetStageMessagingPickList(cmbSMS); Globals.SetAutoDocumentPickList(cmbTemplate); } catch { ShowErrorMessage("Failed to properly initialize documents config"); } }
private void ManageStages_Load(object sender, EventArgs e) { try { SBFAApi agent = new SBFAApi(); using (new OperationContextScope(agent.context)) { sbfa.WorkFlowStages[] response = agent.operation.GetWorkFlowStages(SBFAMain.currentWorkFlow); foreach (sbfa.WorkFlowStages wrkFlow in response) { string currentFlow = "_" + wrkFlow.Id.ToString(); treeStages.Nodes["workStages"].Nodes.Add(currentFlow, wrkFlow.StageName); } Globals.SetPickList(cmbGroup, "rolgro"); Globals.SetPickList(cmbDocType, "doctyp"); } Globals.SetStageMessagingPickList(cmbEmail); Globals.SetStageMessagingPickList(cmbSMS); Globals.SetAutoDocumentPickList(cmbTemplate); cmbAssign.SelectedIndex = 0; } catch { ShowErrorMessage("Error initializing stage configuration"); } }