private void RegistrarInputs() { nombreInput.DataBindings.Add(new TextBinding(this.Model, "Nombre")); Register(ErrorLabel.For(nombreInput, Alignment.Bottom, 2)); telefonoInput.DataBindings.Add(new TextBinding(this.Model, "Telefono")); Register(ErrorLabel.For(telefonoInput, Alignment.Bottom, 2)); mailInput.DataBindings.Add(new TextBinding(this.Model, "Mail")); Register(ErrorLabel.For(mailInput, Alignment.Bottom, 2)); ciudadInput.DataBindings.Add(new TextBinding(this.Model, "Ciudad")); Register(ErrorLabel.For(ciudadInput, Alignment.Bottom, 2)); calleInput.DataBindings.Add(new TextBinding(this.Model, "Calle")); Register(ErrorLabel.For(calleInput, Alignment.Bottom, 2)); nroInput.DataBindings.Add(new TextBinding(this.Model, "NroCalle")); Register(ErrorLabel.For(nroInput, Alignment.Bottom, 2)); cantidadEstrellasInput.DataBindings.Add(new Binding("Value", this.Model, "CantidadEstrellas")); paisCombo.DataSource = paises; paisCombo.DataBindings.Add(new Binding("SelectedValue", this.Model, "IdPais")); recEstrellasInput.DataBindings.Add(new TextBinding(this.Model, "RecargaEstrellas")); Register(ErrorLabel.For(recEstrellasInput, Alignment.Bottom, 2)); FechaCreacionDtp.DataBindings.Add(new Binding("Value", this.Model, "FechaDeCreacion")); }
public PersonForm() : base(model: new Person()) { InitializeComponent(); // Databind the Person.FirstName property to the FirstNameInput textbox FirstNameInput.DataBindings.Add(new TextBinding(this.Model, "FirstName")); Register(Label.For(FirstNameInput)); Register(ErrorLabel.For(FirstNameInput)); LastNameInput.DataBindings.Add(new TextBinding(this.Model, "LastName")); Register(Label.For(LastNameInput)); Register(ErrorLabel.For(LastNameInput)); //Works with ComboBoxes too! AgeInput.DataBindings.Add(new TextBinding(this.Model, "Age")); //Put the label to the right of the input control. Register(Label.For(AgeInput, Alignment.Right)); //Put the validation message under the control, with a little extra padding. Register(ErrorLabel.For(AgeInput, Alignment.Bottom, ErrorLabel.DefaultPadding + 5)); //Register HelloCommand this.SayHelloCmdButton.Command = new SayHelloCommand(this.Model as Person); this.SayHelloCmdButton.DataBindings.Add(new System.Windows.Forms.Binding("CommandParameter", this.LastNameInput, "Text")); //this.SayHelloCmdButton.CommandParameter = "Hola"; }
private void RegistrarInputs() { usuarioInput.DataBindings.Add(new TextBinding(this.Model, "Nombre")); Register(ErrorLabel.For(usuarioInput, Alignment.Bottom, 2)); contraseniaInput.DataBindings.Add(new TextBinding(this.Model, "Password")); Register(ErrorLabel.For(contraseniaInput, Alignment.Bottom, 2)); }
private void RegistrarInputs() { fechaInicioDtp.DataBindings.Add(new Binding("Text", this.Model, "FechaDesde")); Register(ErrorLabel.For(fechaInicioDtp, Alignment.Bottom, 2)); fechaFinDtp.DataBindings.Add(new Binding("Text", this.Model, "FechaHasta")); Register(ErrorLabel.For(fechaFinDtp, Alignment.Bottom, 2)); motivoInput.DataBindings.Add(new TextBinding(this.Model, "Motivo")); Register(ErrorLabel.For(motivoInput, Alignment.Bottom, 2)); }
public void RegistrarInputs() { RefreshFuncionalidadesData(); nombreInput.DataBindings.Add(new TextBinding(this.Model, "Nombre")); Register(ErrorLabel.For(nombreInput, Alignment.Bottom, 2)); this.funcionalidadesCombo.DataSource = funcionalidades; funcionalidadesGrid.AutoGenerateColumns = false; funcionalidadesGrid.DataSource = Rol.Funcionalidades; }
private void RegistrarInputs() { trimestreInput.DataBindings.Add(new TextBinding(this.Model, "Trimestre")); Register(ErrorLabel.For(trimestreInput, Alignment.Bottom, 2)); top5Input.DataBindings.Add(new TextBinding(this.Model, "Top5De")); Register(ErrorLabel.For(top5Input, Alignment.Bottom, 2)); anioInput.DataBindings.Add(new TextBinding(this.Model, "Anio")); Register(ErrorLabel.For(anioInput, Alignment.Bottom, 2)); }
private void RegistrarInputs() { trimestreInput.DataBindings.Add(new TextBinding(this.Model, "Trimestre")); Register(ErrorLabel.For(trimestreInput, Alignment.Bottom, 2)); top5Input.DataBindings.Add(new TextBinding(this.Model, "Top5De")); Register(ErrorLabel.For(top5Input, Alignment.Bottom, 2)); (this.Model as Top5Filtros).Anio = LoginData.SystemDate.Year.ToString(); dateTimePicker1.DataBindings.Add(new TextBinding(this.Model, "Anio")); Register(ErrorLabel.For(dateTimePicker1, Alignment.Bottom, 2)); }
private void RegistrarInputs() { usernameInput.DataBindings.Add(new TextBinding(this.Model, "Username")); Register(ErrorLabel.For(usernameInput, Alignment.Bottom, 2)); passwordInput.DataBindings.Add(new TextBinding(this.Model, "Password")); Register(ErrorLabel.For(passwordInput, Alignment.Bottom, 2)); nombreInput.DataBindings.Add(new TextBinding(this.Model, "Nombre")); Register(ErrorLabel.For(nombreInput, Alignment.Bottom, 2)); apellidoInput.DataBindings.Add(new TextBinding(this.Model, "Apellido")); Register(ErrorLabel.For(apellidoInput, Alignment.Bottom, 2)); telefonoInput.DataBindings.Add(new TextBinding(this.Model, "Telefono")); Register(ErrorLabel.For(telefonoInput, Alignment.Bottom, 2)); mailInput.DataBindings.Add(new TextBinding(this.Model, "Mail")); Register(ErrorLabel.For(mailInput, Alignment.Bottom, 2)); calleInput.DataBindings.Add(new TextBinding(this.Model, "Calle")); Register(ErrorLabel.For(calleInput, Alignment.Bottom, 2)); nroCalleInput.DataBindings.Add(new TextBinding(this.Model, "NroCalle")); Register(ErrorLabel.For(nroCalleInput, Alignment.Bottom, 2)); deptoInput.DataBindings.Add(new TextBinding(this.Model, "Depto")); Register(ErrorLabel.For(deptoInput, Alignment.Bottom, 2)); pisoInput.DataBindings.Add(new TextBinding(this.Model, "Piso")); Register(ErrorLabel.For(pisoInput, Alignment.Bottom, 2)); localidadInput.DataBindings.Add(new TextBinding(this.Model, "Localidad")); Register(ErrorLabel.For(localidadInput, Alignment.Bottom, 2)); nroDocumentoInput.DataBindings.Add(new TextBinding(this.Model, "NroDocumento")); Register(ErrorLabel.For(nroDocumentoInput, Alignment.Bottom, 2)); cboPaisDir.DisplayMember = "Nombre"; cboPaisDir.ValueMember = "idPais"; cboPaisDir.DataSource = paises; //cboPaisDir.DataBindings.Add(new Binding("SelectedValue", this.Model, "IdPais")); cboRol.DisplayMember = "Nombre"; cboRol.ValueMember = "idPais"; cboRol.DataSource = roles; //cboRol.DataBindings.Add(new Binding("SelectedValue", this.Model, "IdRol")); cboTipoDoc.DisplayMember = "detalle"; cboTipoDoc.ValueMember = "idTipoDocumento"; cboTipoDoc.DataSource = tiposDocumento; //cboTipoDoc.DataBindings.Add(new Binding("SelectedValue", this.Model, "IdTipoDocumento")); cboHotel.DisplayMember = "Nombre"; cboHotel.ValueMember = "idHotel"; cboHotel.DataSource = hoteles; //cboHotel.DataBindings.Add(new Binding("SelectedValue", this.Model, "IdHotel")); fechaNacInput.DataBindings.Add(new TextBinding(this.Model, "FechaNac")); Register(ErrorLabel.For(fechaNacInput, Alignment.Bottom, 2)); if ((this.Model as Usuario).Activo == 'S') { activoCheck.Checked = true; } else { activoCheck.Checked = false; } }