Пример #1
0
        private void 追加工时ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (CureentCt == null)
            {
                return;
            }
            DoubleClickButton bt  = (DoubleClickButton)CureentCt;
            int recordid          = int.Parse(bt.Name);
            frmAddHourAddItem fdt = new frmAddHourAddItem(recordid);

            if (fdt.ShowDialog() == DialogResult.OK)
            {
                刷新ToolStripMenuItem_Click(null, null);
            }
        }
Пример #2
0
 private void 追加项目ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (CureentCt != null)
     {
         int recordid           = int.Parse(CureentCt.Name);
         DoubleClickButton bt   = (DoubleClickButton)CureentCt;
         string[]          strs = bt.ImageKey.Split(new Char[] { ',' });
         if (strs.Length > 1)
         {
             if (strs[1] == "完工" || strs[1] == "洗车")
             {
                 frmAddHourAddItem fdt = new frmAddHourAddItem(recordid);
                 if (fdt.ShowDialog() == DialogResult.OK)
                 {
                     刷新ToolStripMenuItem_Click(null, null);
                 }
             }
             else
             {
                 MessageBox.Show("只能在“完工”和“洗车”状态才能追加项目!");
             }
         }
     }
 }