Пример #1
0
        //
        private void returntool_Click(object sender, EventArgs e)
        {
            var toolGet = PublicMethods.transferToInt(ToolNo.Text);

            if (toolGet != -1)
            {
                var stuffNo = stuffAndToolOnWork.FirstOrDefault(p => p.using_tool == toolGet);
                if (stuffNo != null)
                {
                    toolWaiting.Add(toolGet);
                    stuffAndToolOnWork.Remove(stuffAndToolOnWork.First(p => p.using_tool == toolGet));
                    MessageBox.Show(stuffNo.stuff + "号工人下班," + toolGet + "号工具已归还");
                }
                else
                {
                    MessageBox.Show("请勿重复下班!");
                }
            }
            else
            {
                MessageBox.Show("工具号不正确!");
            }
        }