private void btn_submit1_Click(object sender, EventArgs e) { String test = DateTime.Now.ToString("dd/MM/yyy"); if (Tester_Panel.count > 0) { Connectiondb conn = new Connectiondb(); string upquery = "update tbl_tester set result = 'OK' where project_id = '" + Tester_Panel.project_Id + "'"; conn.manipulate(upquery); MessageBox.Show("The project has been completed", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); string ins = "insert into tbl_project_complete values('" + Tester_Panel.project_Id + "','" + Tester_Panel.project_name + "','" + Tester_Panel.project_date + "', '" + Tester_Panel.project_complete + "','" + test.ToString() + "','" + txt_desc.Text + "')"; conn.manipulate(ins); string dlt = "delete from tbl_project where project_id = '" + Tester_Panel.project_Id + "'"; conn.manipulate(dlt); string dlt_ = "delete from tbl_developer where project_id = '" + Tester_Panel.project_Id + "'"; conn.manipulate(dlt_); string dltt = "delete from tbl_tester where project_id = '" + Tester_Panel.project_Id + "'"; conn.manipulate(dltt); this.Close(); } else { MessageBox.Show("You need to select a Row", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btn_sendtodeveloper_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(txtcode.Text) || String.IsNullOrEmpty(txt_lineno.Text)) { MessageBox.Show("Any of the field cannot be empty", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { Connectiondb conn = new Connectiondb(); string query = "select project_id from tbl_developer where project_id='" + Tester_Panel.project_Id + "'"; DataTable dt = conn.retrieve(query); //checking wether rows/data are selected or not if (dt.Rows.Count > 0) { MessageBox.Show("Project has already been sent to Developer", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { string insquery = "insert into tbl_developer values('" + Tester_Panel.project_Id + "','" + Tester_Panel.project_name + "','" + Tester_Panel.project_date + "','" + Tester_Panel.project_complete + "','" + txtcode.Text + "','" + txt_lineno.Text + "','" + txt_status1.Text + "')"; conn.manipulate(insquery); MessageBox.Show("Successfully sent to Developer!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); string upquery = "update tbl_project set status = 'Send to Developer' where project_id = '" + Tester_Panel.project_Id + "'"; conn.manipulate(upquery); this.Close(); } } }
private void btn_refresh_Click(object sender, EventArgs e) { string query = "select * from tbl_project_complete"; Connectiondb conn = new Connectiondb(); DataTable bugDt = conn.retrieve(query); completed.DataSource = bugDt; }
private void btn_refresh1_Click(object sender, EventArgs e) { string pendings = "select * from tbl_project"; Connectiondb conn = new Connectiondb(); DataTable test = conn.retrieve(pendings); pending.DataSource = test; }
private void btn_yes_Click(object sender, EventArgs e) { string query = "delete from tbl_project where project_id = '" + Admin_M_Panel.id + "'"; Connectiondb conn = new Connectiondb(); conn.manipulate(query); MessageBox.Show("Project " + Admin_M_Panel.name + " has been successfully deleted"); this.Hide(); }
private void Admin_M_Panel_Load(object sender, EventArgs e) { time.Text = DateTime.Now.ToLongTimeString(); date.Text = DateTime.Now.ToLongDateString(); string query = "select * from tbl_project_complete"; Connectiondb conn = new Connectiondb(); DataTable bugDt = conn.retrieve(query); completed.DataSource = bugDt; string pendings = "select * from tbl_project"; DataTable test = conn.retrieve(pendings); pending.DataSource = test; }
private void btn_update2_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(txt_upstat1.Text)) { MessageBox.Show("Please write something", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { Connectiondb conn = new Connectiondb(); string query = "UPDATE tbl_project SET status = '" + txt_upstat1.Text + "' WHERE project_id = '" + Tester_Panel.val + "' "; conn.manipulate(query); MessageBox.Show("Status Successfully updated!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Hide(); } }
private void btn_upcode_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(txtcode.Text)) { MessageBox.Show("Please coding cannot be empty", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { Connectiondb conn = new Connectiondb(); string query = "UPDATE tbl_developer SET code = '" + txtcode.Text + "' WHERE project_id = '" + Developer_Panel.Id + "' "; conn.manipulate(query); MessageBox.Show("Code Successfully updated!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Hide(); } }
private void btn_send2developer_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(txtcode.Text) || String.IsNullOrEmpty(txt_lineno1.Text)) { MessageBox.Show("Any of the field cannot be empty", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { Connectiondb conn = new Connectiondb(); string upquery = "update tbl_developer set status = 'Sent from Tester Again', code = '" + txtcode.Text + "', error_line = '" + txt_lineno1.Text + "' where project_id = '" + Tester_Panel.project_Id + "'"; conn.manipulate(upquery); string upqueryt = "update tbl_tester set status = 'Sent to Developer Again', code = '" + txtcode.Text + "', error_line = '" + txt_lineno1.Text + "' where project_id = '" + Tester_Panel.project_Id + "'"; conn.manipulate(upqueryt); this.Close(); MessageBox.Show("Successfully sent to Tester", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }