Пример #1
0
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("codeCtrl.Text", "DataItem.Name");
     BindingManager.AddBinding("providerCtrl.SelectedValue", "DataItem.ProviderType");
     BindingManager.AddBinding("connectionCtrl.Text", "DataItem.ConnectionString");
     BindingManager.AddBinding("deleteBtn.Enabled", "!string.IsNullOrEmpty(DataItem.Id)", BindingDirection.TargetToSource);
 }
Пример #2
0
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("idCtrl.Value", "DataItem.Id");
     BindingManager.AddBinding("GetSetControlUsername", "DataItem.NaasAccount");
     BindingManager.AddBinding("testNaasPasswordCtrl.Text.Trim()", "m_TestPassword");
     BindingManager.AddBinding("prodNaasPasswordCtrl.Text.Trim()", "m_ProdPassword");
 }
Пример #3
0
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("tripMode.Value", "Trip.Mode");
     BindingManager.AddBinding("leavingFromAirportCode.SelectedValue", "Trip.StartingFrom.AirportCode");
     BindingManager.AddBinding("goingToAirportCode.SelectedValue", "Trip.ReturningFrom.AirportCode");
     BindingManager.AddBinding("leavingFromDate.SelectedDate", "Trip.StartingFrom.Date");
     BindingManager.AddBinding("returningOnDate.SelectedDate", "Trip.ReturningFrom.Date");
 }
Пример #4
0
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("codeCtrl.Text", "DataItem.Id");
     BindingManager.AddBinding("codeCtrl.Enabled", "DataItem.IsEditable");
     BindingManager.AddBinding("valueCtrl.Text", "DataItem.Value");
     BindingManager.AddBinding("descriptionCtrl.Text", "DataItem.Description");
     BindingManager.AddBinding("deleteBtn.Enabled", "CanDelete()", BindingDirection.TargetToSource);
 }
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("idCtrl.Value", "DataItem.Id");
     BindingManager.AddBinding("nameCtrl.Text", "DataItem.Name");
     BindingManager.AddBinding("endpointCtrl.Text", "DataItem.Url");
     BindingManager.AddBinding("deleteBtn.Enabled", "!string.IsNullOrEmpty(DataItem.Id)", BindingDirection.TargetToSource);
     BindingManager.AddBinding("VersionDisplyStringToValue", "DataItem.Version");
 }
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("idCtrl.Value", "DataItem.Id");
     BindingManager.AddBinding("nameCtrl.Text", "DataItem.NaasAccount");
     BindingManager.AddBinding("SystemRoleDisplyStringToValue", "DataItem.Role");
     BindingManager.AddBinding("activeCtrl.Checked", "DataItem.IsActive");
     BindingManager.AddBinding("deleteBtn.Enabled", "DataModel.CanDelete", BindingDirection.TargetToSource);
     BindingManager.AddBinding("resetBtn.Enabled", "DataModel.CanDelete", BindingDirection.TargetToSource);
 }
Пример #7
0
    /// <summary>
    /// In order to declare data bindings, all you need to do is
    /// override InitializeDataBindings method and add all necessary
    /// data bindings to the BindingManager.
    /// </summary>
    protected override void InitializeDataBindings()
    {
        // HttpRequestListBindingContainer unbinds specified values from Request -> Productlist
        HttpRequestListBindingContainer requestBindings =
            new HttpRequestListBindingContainer("sku,name,quantity,price", "Products", typeof(ProductInfo));

        requestBindings.AddBinding("sku", "Sku");
        requestBindings.AddBinding("name", "Name");
        requestBindings.AddBinding("quantity", "Quantity", quantityFormatter);
        requestBindings.AddBinding("price", "Price", priceFormatter);

        BindingManager.AddBinding(requestBindings);
    }
Пример #8
0
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("nameValue.Text", "DataItem.NaasAccount",
                               BindingDirection.TargetToSource);
     BindingManager.AddBinding("systemRoleValue.Text", "SystemRoleBinder",
                               BindingDirection.TargetToSource);
     BindingManager.AddBinding("activeValue.Text", "ActiveBinder",
                               BindingDirection.TargetToSource);
     BindingManager.AddBinding("lastModifiedByValue.Text", "LastModifiedByBinder",
                               BindingDirection.TargetToSource);
     BindingManager.AddBinding("lastModifiedOnValue.Text", "DataItem.ModifiedOn",
                               BindingDirection.TargetToSource);
 }
Пример #9
0
 /// <summary>
 /// In order to declare data bindings, all you need to do is
 /// override InitializeDataBindings method and add all necessary
 /// data bindings to the BindingManager.
 /// </summary>
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("FindControl('txtId').Text", "Employee.Id");
     BindingManager.AddBinding("FindControl('txtFirstName').Text", "Employee.FirstName");
     BindingManager.AddBinding("FindControl('txtLastName').Text", "Employee.LastName");
     BindingManager.AddBinding("FindControl('txtDOB').Text", "Employee.DateOfBirth");
     BindingManager.AddBinding("FindControl('txtSalary').Text", "Employee.Salary");
     BindingManager.AddBinding("FindControl('rbgGender').Value", "Employee.Gender");
     BindingManager.AddBinding("FindControl('ddlAddressType').SelectedValue", "Employee.MailingAddress.AddressType");
     BindingManager.AddBinding("FindControl('txtStreet1').Text", "Employee.MailingAddress.Street1");
     BindingManager.AddBinding("FindControl('txtStreet2').Text", "Employee.MailingAddress.Street2");
     BindingManager.AddBinding("FindControl('txtCity').Text", "Employee.MailingAddress.City");
     BindingManager.AddBinding("FindControl('txtState').Text", "Employee.MailingAddress.State");
     BindingManager.AddBinding("FindControl('txtPostalCode').Text", "Employee.MailingAddress.PostalCode");
     BindingManager.AddBinding("FindControl('txtCountry').Text", "Employee.MailingAddress.Country");
 }
Пример #10
0
    /// <summary>
    /// In order to declare data bindings, all you need to do is
    /// override InitializeDataBindings method and add all necessary
    /// data bindings to the BindingManager.
    /// </summary>
    protected override void InitializeDataBindings()
    {
        BindingManager.AddBinding("FindControl('txtId').Text", "Employee.Id");
        BindingManager.AddBinding("FindControl('txtFirstName').Text", "Employee.FirstName");

        // this is rather verbose to show how it works

        // the formatter must convert between ListControl values and domain objects identified by these values (e.g. a key)
        IFormatter dsFormatter = new DataSourceItemFormatter("DataSource", "DataValueField");
        // bind the lstHobbies control to Employee.Hobbies IList
        MultipleSelectionListControlBinding listBinding = new MultipleSelectionListControlBinding("FindControl('lstHobbies')", "Employee.Hobbies", BindingDirection.Bidirectional, dsFormatter);

        BindingManager.AddBinding(listBinding);

        // use simple name=value binding
        BindingManager.AddBinding(new MultipleSelectionListControlBinding("FindControl('lstFavoriteFood')", "Employee.FavoriteFood", BindingDirection.Bidirectional, new NullFormatter()));
    }
 /// <summary>
 /// In order to declare data bindings, all you need to do is
 /// override InitializeDataBindings method and add all necessary
 /// data bindings to the BindingManager.
 /// </summary>
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("FindControl('txtId').Text", "Employee.Id")
     .SetErrorMessage("ID has to be an integer", "id.errors", "summary");
     BindingManager.AddBinding("FindControl('txtFirstName').Text", "Employee.FirstName");
     BindingManager.AddBinding("FindControl('txtLastName').Text", "Employee.LastName");
     BindingManager.AddBinding("FindControl('txtDOB').Text", "Employee.DateOfBirth")
     .SetErrorMessage("Invalid date value", "dob.errors", "summary");
     BindingManager.AddBinding("FindControl('txtSalary').Text", "Employee.Salary", new CurrencyFormatter())
     .SetErrorMessage("Salary must be a valid currency value.", "salary.errors", "summary");
     BindingManager.AddBinding("FindControl('rbgGender').Value", "Employee.Gender");
     BindingManager.AddBinding("FindControl('ddlAddressType').SelectedValue", "Employee.MailingAddress.AddressType");
     BindingManager.AddBinding("FindControl('txtStreet1').Text", "Employee.MailingAddress.Street1");
     BindingManager.AddBinding("FindControl('txtStreet2').Text", "Employee.MailingAddress.Street2");
     BindingManager.AddBinding("FindControl('txtCity').Text", "Employee.MailingAddress.City");
     BindingManager.AddBinding("FindControl('txtState').Text", "Employee.MailingAddress.State");
     BindingManager.AddBinding("FindControl('txtPostalCode').Text", "Employee.MailingAddress.PostalCode");
     BindingManager.AddBinding("FindControl('txtCountry').Text", "Employee.MailingAddress.Country");
 }
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("FromDateBinder", "DataItem.CreatedFrom",
                               BindingDirection.SourceToTarget);
     BindingManager.AddBinding("ToDateBinder", "DataItem.CreatedTo",
                               BindingDirection.SourceToTarget);
     BindingManager.AddBinding("ExchangeBinder", "DataItem.FlowNames",
                               BindingDirection.SourceToTarget);
     BindingManager.AddBinding("OperationBinder", "DataItem.OperationName",
                               BindingDirection.SourceToTarget);
     BindingManager.AddBinding("ActivityTypeBinder", "DataItem.Type",
                               BindingDirection.SourceToTarget);
     BindingManager.AddBinding("NodeMethodBinder", "DataItem.NodeMethod",
                               BindingDirection.SourceToTarget);
     BindingManager.AddBinding("transactionIdCtrl.Text", "DataItem.TransactionId",
                               BindingDirection.SourceToTarget);
     BindingManager.AddBinding("fromIpCtrl.SelectedValue", "DataItem.IP",
                               BindingDirection.SourceToTarget);
     BindingManager.AddBinding("byUserCtrl.SelectedValue", "DataItem.CreatedByUsername",
                               BindingDirection.SourceToTarget);
     BindingManager.AddBinding("contentCtrl.Text", "DataItem.DetailContains",
                               BindingDirection.SourceToTarget);
 }
Пример #13
0
    /// <summary>
    /// In order to declare data bindings, all you need to do is
    /// override InitializeDataBindings method and add all necessary
    /// data bindings to the BindingManager.
    /// </summary>
    protected override void InitializeDataBindings()
    {
        // the line below would also work in full trusted environments due to control members
        // being generated as protected members by ASP.NET:
        //        BindingManager.AddBinding("txtId.Text", "Employee.Id")

        BindingManager.AddBinding("FindControl('txtId').Text", "Employee.Id")
        .SetErrorMessage("ID has to be an integer", "id.errors");     // send msg to "id.errors" provider
        BindingManager.AddBinding("FindControl('txtFirstName').Text", "Employee.FirstName");
        BindingManager.AddBinding("FindControl('txtLastName').Text", "Employee.LastName");
        BindingManager.AddBinding("FindControl('txtDOB').Text", "Employee.DateOfBirth")
        .SetErrorMessage("Invalid date value", "dob.errors");
        BindingManager.AddBinding("FindControl('txtSalary').Text", "Employee.Salary", new CurrencyFormatter())
        .SetErrorMessage("Salary must be a valid currency value.", "salary.errors");
        BindingManager.AddBinding("FindControl('rbgGender').Value", "Employee.Gender");
        BindingManager.AddBinding("FindControl('ddlAddressType').SelectedValue", "Employee.MailingAddress.AddressType");
        BindingManager.AddBinding("FindControl('txtStreet1').Text", "Employee.MailingAddress.Street1");
        BindingManager.AddBinding("FindControl('txtStreet2').Text", "Employee.MailingAddress.Street2");
        BindingManager.AddBinding("FindControl('txtCity').Text", "Employee.MailingAddress.City");
        BindingManager.AddBinding("FindControl('txtState').Text", "Employee.MailingAddress.State");
        BindingManager.AddBinding("FindControl('txtPostalCode').Text", "Employee.MailingAddress.PostalCode");
        BindingManager.AddBinding("FindControl('txtCountry').Text", "Employee.MailingAddress.Country");
    }
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("nameValue.Text", "DataItem.NaasAccount",
                               BindingDirection.TargetToSource);
 }
Пример #15
0
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("outboundFlight.Value", "outboundFlightIndex");
     BindingManager.AddBinding("returnFlight.Value", "returnFlightIndex");
 }
Пример #16
0
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("flowDropDownList.SelectedValue", "Model.FlowName",
                               BindingDirection.SourceToTarget);
 }
Пример #17
0
 /// <summary>
 /// In order to declare data bindings, all you need to do is
 /// override InitializeDataBindings method and add all necessary
 /// data bindings to the BindingManager.
 /// </summary>
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("FindControl('txtName').Text", "Name");
     BindingManager.AddBinding("FindControl('lblName').Text", "Name", BindingDirection.TargetToSource);
 }
Пример #18
0
 protected override void InitializeDataBindings()
 {
     BindingManager.AddBinding("taskNameCtrl.Text", "GetTaskName()", BindingDirection.TargetToSource);
     BindingManager.AddBinding("transactionIdCtrl.Text", "GetTransactionId()", BindingDirection.TargetToSource);
     BindingManager.AddBinding("transactionCreatedByCtrl.Text", "GetUsername()", BindingDirection.TargetToSource);
 }