private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { //button4.Show(); ProjectAssignDAO bugInformationDAO = new ProjectAssignDAO(); string value = comboBox1.SelectedItem.ToString(); string[] s = value.Split(','); id = Convert.ToInt32(s[0]); //Assign assign = new Assign //{ // AssignBy = Program.userId, // AssignTo = id, // Description = textBox3.Text.ToString() //}; //try //{ // bugInformationDAO.Insert(assign); // MessageBox.Show("Task assigned"); //} catch(Exception ex) //{ // Console.WriteLine(ex.Message); //} }
private void assignedUser() { listBox1.Items.Clear(); ProjectAssignDAO assignDAO = new ProjectAssignDAO(); List <string> assignList = assignDAO.GetAllAssignedUsersByBugId(Program.bugId); foreach (var a in assignList) { listBox1.Items.Add(a); } }
private void button4_Click(object sender, EventArgs e) { ProjectAssignDAO assignDAO = new ProjectAssignDAO(); try { bool res = assignDAO.RemoveAssignedUser(Program.bugId, id); if (res) { assignedUser(); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private void button3_Click(object sender, EventArgs e) { assignedUser(); ProjectAssign assign = new ProjectAssign { AssignBy = UserLogin.userId, AssignTo = id, Description = textBox3.Text, BugId = Program.bugId }; ProjectAssignDAO assignDAO = new ProjectAssignDAO(); try { assignDAO.Insert(assign); MessageBox.Show("Task assigned"); } catch (Exception ex) { Console.WriteLine(ex.Message); } }