Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SetAccessToken();
            string spUri = base.GetSharepointUri();
            string accessToken = base.accessToken;

            var formLibraryEventReceiverVM = new FormLibraryEventReceiverVM(accessToken, spUri);
            ClientContext clientContext = formLibraryEventReceiverVM.clientContext;

            SetElementProperties(clientContext);
        }
Example #2
0
        protected void btn_SaveSettings_Click(object sender, EventArgs e)
        {
            string enabledKey = LblListGuid.Text.ToString() + GRSPClassLibrary.Base.Constants.KEY_DBXL_PROPERTY_RER_ENABLED;
            string docTypeKey = LblListGuid.Text.ToString() + GRSPClassLibrary.Base.Constants.KEY_DBXL_PROPERTY_DOCTYPE;

            Dictionary<string, string> formVariables = new Dictionary<string, string>()
            {
                { enabledKey, CbxRerEnabled.Checked.ToString() },
                { docTypeKey, TxtDocType.Text },
                { GRSPClassLibrary.Base.Constants.DBXL_SERVICE_URL_NAME, TxtServiceUrl.Text },
                { GRSPClassLibrary.Base.Constants.DBXL_USERNAME, TxtUsername.Text },
                { GRSPClassLibrary.Base.Constants.DBXL_PASSWORD, TxtPassword.Text }
            };

            string spUri = base.GetSharepointUri();
            string accessToken = this.btn_SaveSettings.CommandArgument;

            var formLibraryEventReceiverVM = new FormLibraryEventReceiverVM(accessToken, spUri);
            formLibraryEventReceiverVM.setDBXLProperties(formVariables);
        }