コード例 #1
0
 void btnAddUser_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(txtNewFName.Text) ||
         string.IsNullOrWhiteSpace(txtNewLName.Text) ||
         string.IsNullOrWhiteSpace(txtNewNumber.Text))
     {
         return;
     }
     DBOperator.AddUserToBase(txtNewFName.Text, txtNewLName.Text, txtNewNumber.Text);
     phoneGridView.DataSource = null;
     phoneGridView.DataSource = DBOperator.GetAllUsersFromBase();
 }
コード例 #2
0
 void MainForm_Load(object sender, EventArgs e)
 {
     phoneGridView.DataSource = DBOperator.GetAllUsersFromBase();
 }