private void t_issueItemQty_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         try
         {
             //检查
             check_issueItemQty();
             //计算实时库存
             calcRealTimeStock_issueItemQty();
             //判断只能为数字
             //插入 货号,品名,数量,专柜名称,插入时间
             //插入,更新
             insert_update_issueItemQty();
             //不可辑编
             controlTool.Edit(t_issueItemQty, false);
             //发送事件
             Event_ItemNo();
             //转移焦点
             ctrl_name_itemNo1.Enable_TextBox();
         }
         catch (System.FormatException ex) { MessageBox.Show(ex.Message); }
         catch (System.OverflowException ex) { MessageBox.Show(ex.Message); }
         catch (IAmCheckException ex) { MessageBox.Show(ex.Message); }
         catch (IAmMySqlException ex) { reset_calcRealTimeStock_issueItemQty(); MessageBox.Show(ex.Message); }
         finally
         {
             //清空
             controlTool.Empty(t_issueItemQty);
         }
     }
 }
Beispiel #2
0
 private void t_barcode_KeyDown(object sender, KeyEventArgs e)
 {//扫描条码
     if (e.KeyCode == Keys.Enter)
     {
         try
         {
             //检查
             Check_barcode();
             //查询
             Query_barcode();
             //显示
             ShowInfo();
         }
         catch (myException.IAmCheckException ex)
         {   //清空
             controlTool.Empty(t_name_itemNo);
             MessageBox.Show(ex.Message);
         }
     }
 }