private void button1_Click(object sender, EventArgs e)
        {
            info.name     = NameTextBox.Text;
            info.password = PasswordTextBox.Text;
            info.role     = RolecomboBox.SelectedItem.ToString();
            info.username = UsernameTextBox.Text;
            info.address  = AddressTextBox.Text;
            info.mobile   = MobileTextBox.Text;
            info.team_id  = TeamIDtextBox.Text;


            if (NameTextBox.Text == "" || UsernameTextBox.Text == "" || PasswordTextBox.Text == "" || AddressTextBox.Text == "" || MobileTextBox.Text == "")
            {
                MetroFramework.MetroMessageBox.Show(this, "Something is missing.Plese check it again.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                dt = opr.NewUser(info);
                LoginForm lf = new LoginForm();
                lf.Show();
                this.Hide();

                MetroFramework.MetroMessageBox.Show(this, "Congratulation.", "Registration Successfull", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     info.name     = NameTextBox.Text;
     info.username = UsernametextBox.Text;
     info.role     = RolecomboBox.SelectedItem.ToString();
     info.password = PasswordTextBox.Text;
     info.address  = AddressTextBox.Text;
     info.mobile   = MobileTextBox.Text;
     info.team_id  = TeamIdtextBox.Text;
     dt            = opr.NewUser(info);
     refreshing(ManagerDataView);
 }
 private void button1_Click(object sender, EventArgs e)
 {
     info.name     = NameTextBox.Text;
     info.username = UsernametextBox.Text;
     info.role     = RolecomboBox.SelectedItem.ToString();
     info.password = PasswordTextBox.Text;
     info.address  = AddressTextBox.Text;
     info.mobile   = MobileTextBox.Text;
     info.team_id  = TeamIdtextBox.Text;
     dt            = opr.NewUser(info);
     MetroFramework.MetroMessageBox.Show(this, "Data Inserted", "Successfull", MessageBoxButtons.OK, MessageBoxIcon.Information);
     refreshing(SupervisorDataView);
 }