コード例 #1
0
        private void btn_EditUser_Click(object sender, EventArgs e)
        {
            try
            {
                id_User = Convert.ToInt32(grid_SearchUsers.SelectedRows[0].Cells[0].Value.ToString());

                answer = tau.GetDataById(id_User);

                frm_EditUsers.txt_Identification.Text = answer[0].Numero_Identificacion.ToString();
                frm_EditUsers.txt_FirstName.Text      = answer[0].Nombres.ToString();
                frm_EditUsers.txt_LastName.Text       = answer[0].Apellidos.ToString();
                frm_EditUsers.dtp_Birthdate.Text      = answer[0].Fecha_Nacimiento.ToString();
                frm_EditUsers.txt_Neighborhood.Text   = answer[0].Dir_Barrio.ToString();
                frm_EditUsers.txt_Adress.Text         = answer[0].Dir_Numero.ToString();
                frm_EditUsers.cmb_UserType.Text       = answer[0].Tipo_Usuario.ToString();
                frm_EditUsers.txt_User.Text           = answer[0].Usuario.ToString();
                frm_EditUsers.txt_Password.Text       = answer[0].Contrasena.ToString();

                frm_EditUsers.Found = true;

                this.Close();
                frm_EditUsers.Show();
            }
            catch (Exception err)
            {
                MessageBox.Show("Error al Modificar! Seleccione un usuario que sea valido" + err.Message, "Modificar Usuario",
                                MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
        }
コード例 #2
0
 private void ts_EditUser_Click(object sender, EventArgs e)
 {
     if (!formExist("OptionsUsers"))
     {
         frm_OptionUsers           = new OptionsUsers();
         frm_OptionUsers.MdiParent = this;
         frm_OptionUsers.Show();
     }
 }
コード例 #3
0
 private void btn_Users_Click(object sender, EventArgs e)
 {
     frm_OptionUsers           = new OptionsUsers();
     frm_OptionUsers.MdiParent = this.MdiParent;
     frm_OptionUsers.Show();
 }