Example #1
0
        private void NObutton_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Seguro que no agregar usuario?", "Agregar Usuario", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
            {

                Dashboard regresar = new Dashboard();
                regresar.ShowDialog();
                this.Close();
            }
        }
Example #2
0
        private void OKbutton_Click(object sender, EventArgs e)
        {
            if (tbName.Text != "" && tbLastname.Text != "" && tbAge.Text != "" && cbGenre.Text != "" && tbPhonenumber.Text != "" && tbAddress.Text != "")
            {
                UserModel us = new UserModel();
                us.name = tbName.Text;
                us.lastName = tbLastname.Text;
                us.age = int.Parse(tbAge.Text);
                us.genre = cbGenre.SelectedItem.ToString();
                us.phoneNumber = int.Parse(tbPhonenumber.Text);
                us.address = tbAddress.Text;
                string apo = Path.Combine(AppDomain.CurrentDomain.BaseDirectory + @"UserProfile", temp);
                us.imageUser = apo.Replace('\\','/');
                BDQuery.AddToBase(us, "user");

                MessageBox.Show("Usuario agregado.", "Agregar Usuario", MessageBoxButtons.OK, MessageBoxIcon.Information);

                Dashboard regresar = new Dashboard();
                regresar.ShowDialog();
                this.Close();
            }
        }
 private void Backbutton_Click(object sender, EventArgs e)
 {
     this.Close();
     Dashboard regresar = new Dashboard();
     regresar.ShowDialog();
 }
Example #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     this.Close();
     Dashboard ir = new Dashboard();
     ir.ShowDialog();
 }