public static DateTimeCustomControl BindDate(Panel p) { try { DateTimeCustomControl datec = new DateTimeCustomControl(); datec.AjaxFunctionality = false; datec.TextBoxCSSClass = "form_text"; datec.ValidatorsCSSClass = "form_field_error_message"; datec.Required = true; p.Controls.Add(datec); return datec; } catch (Exception ex ) { return null; } }
private void FillDefaults() { ListBinder.BindIdentificationType(this.rdTipoDeIdentificacion, "Title", "Value"); ListBinder.BindMaritaStatus(this.rdEstadoCivil, "Title", "ID"); ctrlDireccionActual = ListBinder.BindPanel(pnlDireccionActual, "DireccionActual", "Dirección actual"); ctrlFechaDeNacimiento = ListBinder.BindDate(pnldtFechaDeNacimiento); ctrlFechaDeNacimiento2 = ListBinder.BindDate(pnldtFechaDeNacimiento2); ctrlFechaDeNacimiento3 = ListBinder.BindDate(pnldtFechaDeNacimiento3); crtlTelefono = ListBinder.BindTelephone(pnlTelefono, "txtTelefono", true, null, "form_field_error_message", "form_text"); crtlTelefono2 = ListBinder.BindTelephone(pnlTelefono2, "txtTelefono2", false, null, "form_field_error_message", "form_text"); }
protected void Page_Load(object sender, EventArgs e) { try { if (this.IsPostBack) { // Do Settings here } else { // Moisture(); } DateTimeCustomControl dtCustomFcha = new DateTimeCustomControl(); dtCustomFcha.AjaxFunctionality = true; dtCustomFcha.ID = "dtCustomFcha"; dtCustomFcha.TextBoxCSSClass = "form_text"; dtCustomFcha.Required = true; dtCustomFcha.ValidatorsCSSClass = "form_field_error_message"; pnldtFechaConstitucion.Controls.Add(dtCustomFcha); // TO DO: Convert pnldtFechaConstitucion to Custom DateTimePicker AddressControl ucDireccion = new AddressControl(); ucDireccion.ID = "Address"; ucDireccion.TextBoxClass = "form_text"; ucDireccion.ValidatorClass = "form_field_error_message"; pnlDireccion.Controls.Add(ucDireccion); TelephoneControl txtTelefono = new TelephoneControl(); txtTelefono.ID = "txtTelefono"; txtTelefono.Required = false; txtTelefono.ValidationGroup = "grpUserNew"; txtTelefono.ValidatorsCSSClass = "form_field_error_message"; txtTelefono.TextBoxCSSClass = "form_text"; pnlTelefono_1.Controls.Add(txtTelefono); TelephoneControl txtTelefono2 = new TelephoneControl(); txtTelefono2.ID = "txtTelefono2"; txtTelefono2.Required = false; txtTelefono2.ValidationGroup = "grpUserNew"; txtTelefono2.ValidatorsCSSClass = "form_field_error_message"; txtTelefono2.TextBoxCSSClass = "form_text"; pnlTelefono_2.Controls.Add(txtTelefono2); } catch (Exception Ex) { } }
private void CreateDateControls() { dtFechaDeLaSuspensionInicial = new DateTimeCustomControl(); dtFechaDeLaSuspensionInicial.AjaxFunctionality = false; dtFechaDeLaSuspensionInicial.TextBoxCSSClass = "form_text"; dtFechaDeLaSuspensionInicial.ValidatorsCSSClass = "form_field_error_message"; dtFechaDeLaSuspensionInicial.Required = true; pnldtFechaDeLaSuspensionInicial.Controls.Add(dtFechaDeLaSuspensionInicial); dtFechaDeLaSuspensionFinal = new DateTimeCustomControl(); dtFechaDeLaSuspensionFinal.AjaxFunctionality = false; dtFechaDeLaSuspensionFinal.TextBoxCSSClass = "form_text"; dtFechaDeLaSuspensionFinal.ValidatorsCSSClass = "form_field_error_message"; dtFechaDeLaSuspensionFinal.Required = true; pnldtFechaDeLaSuspensionFinal.Controls.Add(dtFechaDeLaSuspensionFinal); }