Exemplo n.º 1
0
 private void newProject_Click(object sender, EventArgs e)
 {
     //if it is new project the id we must sent to view is -1
     projectpage p = new projectpage(-1);
     p.ShowDialog();
     FillGrid();
 }
Exemplo n.º 2
0
 private void projectsTable_CellDoubleClick(object sender, GridViewCellEventArgs e)
 {
     //if double clicked on an a row we must open it on the project view for edit
     //we can find project's data with its ID
     if (e.RowIndex != -1)
     {
         int id = Convert.ToInt32(projectsTable.CurrentRow.Cells["ID"].Value);
         projectpage p = new projectpage(id);
         p.ShowDialog();
         FillGrid();
     }
 }