Example #1
0
 private void dataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dataGridView.Columns[dataGridView.CurrentCell.ColumnIndex].DataPropertyName.Contains("id"))
     {
         InfoCustomer data = new InfoCustomer
         {
             id      = (string)dataGridView.Rows[e.RowIndex].Cells["id"].Value,
             name    = (string)dataGridView.Rows[e.RowIndex].Cells["name"].Value,
             phone   = (string)dataGridView.Rows[e.RowIndex].Cells["phone"].Value,
             date    = (DateTime)dataGridView.Rows[e.RowIndex].Cells["date"].Value,
             link    = (string)dataGridView.Rows[e.RowIndex].Cells["link"].Value,
             ordered = (bool)dataGridView.Rows[e.RowIndex].Cells["ordered"].Value
         };
         FormAdd updateData = new FormAdd(data, _allCustomer, this);
         updateData.Show();
     }
 }
Example #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FormAdd formAdd = new FormAdd();

            formAdd.ShowDialog();
        }