コード例 #1
0
        private void BtnNew_Click(object sender, EventArgs e)
        {
            FrmPeopleCreateOrEdit frm = new FrmPeopleCreateOrEdit(DalPeople);

            frm.ShowDialog();
            GridLoad();
        }
コード例 #2
0
 private void GridPeople_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex > -1 && e.RowIndex > -1)
     {
         if (int.TryParse(GridPeople.CurrentRow.Cells[0].Value.ToString(), out var id))
         {
             FrmPeopleCreateOrEdit frm = new FrmPeopleCreateOrEdit(DalPeople, id);
             frm.ShowDialog();
             GridLoad();
         }
     }
 }
コード例 #3
0
 private void BtnEdit_Click(object sender, EventArgs e)
 {
     if (GridPeople.Rows.Count > 0)
     {
         if (GridPeople.CurrentRow != null)
         {
             if (int.TryParse(GridPeople.CurrentRow.Cells[0].Value.ToString(), out var id))
             {
                 FrmPeopleCreateOrEdit frm = new FrmPeopleCreateOrEdit(DalPeople, id);
                 frm.ShowDialog();
                 GridLoad();
             }
         }
     }
 }