public static ClientView newClient() { Client c = new Client(); ClientView dv = new ClientView(c); new DAOs.ClientsDAO(dv.db).insertOnSubmit(c); return dv; }
private void clientsTable_CellDoubleClick(object sender, GridViewCellEventArgs e) { //if double clicked on an a row we must open it on the client view for edit //we can find user's data with its ID if (e.RowIndex != -1) { ClientView c = new ClientView((Client)cb.Current); c.ShowDialog(); new DAOs.ClientsDAO(db).update(); FillGrid(); } }