private void gvIssues_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (gvIssues.SelectedRows[0].Cells[2].Value.ToString() == "Issue") { EditIssue frm = new GIM.EditIssue(Convert.ToInt32(gvIssues.SelectedRows[0].Cells[0].Value), UserID); frm.Show(); } else { AddLog lfrm = new AddLog(Convert.ToInt32(gvIssues.SelectedRows[0].Cells[0].Value), UserID); lfrm.ShowDialog(); } }
private void btOpenIssue_Click(object sender, EventArgs e) { DBlayer dba = new DBlayer(); try { DataSet dsIssue = dba.GetTable("GIMissue", Convert.ToInt32(tbIssueID.Text)); if (Convert.ToInt32(dsIssue.Tables[0].Rows[0]["Type"]) == 1) { EditIssue frm = new GIM.EditIssue(Convert.ToInt32(tbIssueID.Text), UserID); frm.Show(); } else if (Convert.ToInt32(dsIssue.Tables[0].Rows[0]["Type"]) == 2) { AddLog fal = new AddLog(Convert.ToInt32(tbIssueID.Text), UserID); fal.ShowDialog(); } } catch { } }