private void btnAddProperty_Click(object sender, EventArgs e)
 {
     try
     {
         if (tbResourceProperty.Text != string.Empty)
         {
             _sdataResourcePropertyRequest.ResourceProperties.Add(tbResourceProperty.Text);
             lbProperties.Items.Add(tbResourceProperty.Text);
             tbResourcePropertiesURL.Text = _sdataResourcePropertyRequest.ToString();
             tbResourceProperty.Text      = "";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #2
0
        public void ResourceProperty_Verify_ToStringWithMultipleResourceProperties()
        {
            var b = new SDataResourcePropertyRequest(_service)
            {
                ResourceKind       = "employees",
                ResourceSelector   = "1",
                ResourceProperties = { "Address", "City" }
            };

            var url = b.ToString();

            Expect(url, Is.EqualTo("http://localhost:59213/sdata/aw/dynamic/-/employees(1)/Address/City"));
        }
Exemple #3
0
        public void ResourceProperty_Verify_ToStringWithSingleResourceProperty()
        {
            var request = new SDataResourcePropertyRequest(_service)
            {
                ResourceKind       = "employees",
                ResourceSelector   = "1",
                ResourceProperties = { "LoginID" }
            };

            var url = request.ToString();

            Expect(url, Is.EqualTo("http://localhost:59213/sdata/aw/dynamic/-/employees(1)/LoginID"));
        }
 public override void Refresh()
 {
     try
     {
         _sdataResourcePropertyRequest = new SDataResourcePropertyRequest(Service)
         {
             ResourceKind     = tbRPResourceKind.Text,
             ResourceSelector = tbRPResourceSelector.Text
         };
         tbResourcePropertiesURL.Text = _sdataResourcePropertyRequest.ToString();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }