private async Task FillFinalActionsListSource(string controlName) { var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName); if (control != null) { control.ListItems = await GetFinalActionListItems(); } }
private async Task FillFileSelectorSource(string controlName) { var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName); if (control != null) { control.ListItems = await GetCurrentUsersFiles(); } }
// TODO: finish that later. /* * public object Execute(SlackPayloadDTO curSlackPayload) * { * string responseText = string.Empty; * Encoding encoding = new UTF8Encoding(); * * const string webhookUrl = "WebhookUrl"; * Uri uri = new Uri(ConfigurationManager.AppSettings[webhookUrl]); * * string payloadJson = JsonConvert.SerializeObject(curSlackPayload); * * using (WebClient client = new WebClient()) * { * NameValueCollection data = new NameValueCollection(); * data["payload"] = payloadJson; * * var response = client.UploadValues(uri, "POST", data); * * responseText = encoding.GetString(response); * } * return responseText; * } */ #region Fill Source private async Task FillSlackChannelsSource(string controlName, string oAuthToken) { var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName); if (control != null) { control.ListItems = await GetAllChannelList(oAuthToken); } }
private void FillObjectsSource(string controlName) { var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName); if (control != null) { control.ListItems = GetObjects(); } }
public void FillDocuSignTemplateSource(string controlName) { var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName); if (control != null) { var conf = DocuSignManager.SetUp(AuthorizationToken); var templates = DocuSignManager.GetTemplatesList(conf); control.ListItems = templates.Select(x => new ListItem() { Key = x.Key, Value = x.Value }).ToList(); } }
private void FillStatusSource(string controlName) { var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName); if (control != null) { control.ListItems = DocuSignQuery.Statuses .Select(x => new ListItem() { Key = x.Key, Value = x.Value }) .ToList(); } }
private void FillFolderSource(string controlName) { var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName); if (control != null) { var conf = DocuSignManager.SetUp(AuthorizationToken); control.ListItems = DocuSignFolders.GetFolders(conf) .Select(x => new ListItem() { Key = x.Key, Value = x.Value }) .ToList(); } }
private CrateDetails GetSelectedCrateDetails() { var upstreamCrateChooser = ConfigurationControls.FindByNameNested <UpstreamCrateChooser>("UpstreamCrateChooser"); return(upstreamCrateChooser.SelectedCrates.First()); }