private void button1_Click(object sender, EventArgs e) { message = textBox2.Text; if (judge_result != "") { if (judge_result == "PASS") { String pre_command = String.Format("update `missioncom` set 審核='PASS',Judger='{1}' where ID='{0}'", Mission_ID, account); MySQL mySQL = new MySQL("missioncom"); mySQL.RunCommand(pre_command); listBox1.Items.Remove(selected); MissionCom missionCom = new MissionCom(Mission_ID); List <String> list = new List <string>(); for (int i = 0; i < listBox1.Items.Count; i++) { if (listBox1.Items[i].ToString().Contains(missionCom.name + " " + missionCom.MissionInfo)) { list.Add(listBox1.Items[i].ToString()); } } Mission_Dispose(list); } else { String pre_command = String.Format("update `missioncom` set 審核='DENIED',Judger='{1}',審核訊息='{2}' where ID='{0}'", Mission_ID, account, message); MySQL mySQL = new MySQL("missioncom"); mySQL.RunCommand(pre_command); listBox1.Items.Remove(selected); } } MessageBox.Show("審核成功送出!", "Judge Successful", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void Form2_Load(object sender, EventArgs e) { MissionCom mission = new MissionCom(Mission_Number); label2.Text = String.Format("ID: {0}", mission.ID); label3.Text = String.Format("Mission_Name: {0}", mission.MissionInfo); if (mission.judge == "PASS") { label4.ForeColor = Color.Green; label4.Text = String.Format("Response Result: 通過"); Checked(true); } else if (mission.judge == "DENIED") { label4.ForeColor = Color.Red; if (mission.judge_message != null && mission.judge_message != "") { label4.Text = String.Format("Response Result: 不通過-{0}", mission.judge_message); } else { label4.Text = "Response Result: 不通過"; } Checked(false); } }
private void SelectBox(String text) { textBox3.Text = null; String ID = text.Split(' ')[0]; Mission_ID = ID; MissionCom missionCom = new MissionCom(ID); label2.Text = "任務: " + missionCom.MissionInfo; label3.Text = "任務繳交者: " + missionCom.name; String[] message = missionCom.Post_Script.Split('*'); for (int i = 0; i < message.Length; i++) { textBox3.Text += message[i].Replace("┘", "'") + Environment.NewLine; } textBox1.Text = missionCom.HandleFileURL; }