private void listBox1_DoubleClick(object sender, EventArgs e) { /*if (listBox1.SelectedItem != null) { * listBox2.Items.Add(listBox1.SelectedItem); * listBox1.Items.RemoveAt(listBox1.SelectedIndex); * }*/ string s = listBox1.SelectedItem.ToString(); string[] strarray = s.Split(' '); Model.Order temp = myOrderManager.GetByOrderId(int.Parse(strarray[0])); temp.OrderStatus = Model.OrderStatus.Processing; myOrderManager.DeleteByOrderId(int.Parse(strarray[0])); myOrderManager.AddNew(temp); refreshLists(); }
private void listBox2_DoubleClick(object sender, EventArgs e) { /*listBox3.Items.Add(listBox2.SelectedItem); * listBox2.Items.RemoveAt(listBox2.SelectedIndex);*/ if (listBox3.Items.Count > 5) { listBox3.Items.RemoveAt(0); } string s = listBox2.SelectedItem.ToString(); string[] strarray = s.Split(' '); Model.Order temp = myOrderManager.GetByOrderId(int.Parse(strarray[0])); temp.OrderStatus = Model.OrderStatus.Finish; myOrderManager.DeleteByOrderId(int.Parse(strarray[0])); myOrderManager.AddNew(temp); refreshLists(); }