private void ReseTextBox() { this.Abo_Load(abo, usu); MtxtIdentification.ResetText(); TxtName.ResetText(); TxtFirstN.ResetText(); TxtLastN.ResetText(); MtxtPhone.ResetText(); MtxtMovil.ResetText(); TxtEmail.ResetText(); TxtAddress.ResetText(); }
public void Abo_Load(Abonado ab, Usuario user) { abo = new Abonado(); abo = ab; if (radioButton1.Checked == true) { MtxtIdentification.Mask = "00-0000-0000"; } else { MtxtIdentification.Mask = "00-0000-0000-0000-0000"; } if (abo.Identification == null) { btnSaveUpdate.Text = "Guardar"; MtxtIdentification.Enabled = true; // txt modo sin edicion MtxtIdentification.ReadOnly = false; // txt modo solo lectura return; } else { btnSaveUpdate.Text = "Editar"; MtxtIdentification.AppendText(abo.Identification.ToString()); MtxtIdentification.Enabled = false; MtxtIdentification.ReadOnly = true; TxtName.Text = abo.Name.ToString(); TxtFirstN.Text = abo.Firstname.ToString(); TxtLastN.Text = abo.Lastname.ToString(); MtxtMovil.Text = abo.Movil.ToString(); MtxtPhone.AppendText(abo.Phonenum.ToString()); TxtEmail.Text = abo.Email.ToString(); dateTimePicker1.Text = abo.Dateregister.ToString(); TxtAddress.Text = abo.Address.ToString(); } }