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

            if (control != null)
            {
                control.ListItems = await GetFinalActionListItems();
            }
        }
コード例 #2
0
        private async Task FillFileSelectorSource(string controlName)
        {
            var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName);

            if (control != null)
            {
                control.ListItems = await GetCurrentUsersFiles();
            }
        }
コード例 #3
0
        // 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);
            }
        }
コード例 #4
0
        private void FillObjectsSource(string controlName)
        {
            var control = ConfigurationControls.FindByNameNested <DropDownList>(controlName);

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

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