Example #1
0
        private async Task FillFinalActionsListSource(string controlName)
        {
            var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName);

            if (control != null)
            {
                control.ListItems = await GetFinalActionListItems();
            }
        }
Example #2
0
        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);
            }
        }
Example #4
0
        private void FillObjectsSource(string controlName)
        {
            var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName);

            if (control != null)
            {
                control.ListItems = GetObjects();
            }
        }
Example #5
0
        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();
            }
        }
Example #8
0
        private CrateDetails GetSelectedCrateDetails()
        {
            var upstreamCrateChooser = ConfigurationControls.FindByNameNested <UpstreamCrateChooser>("UpstreamCrateChooser");

            return(upstreamCrateChooser.SelectedCrates.First());
        }