Esempio n. 1
0
 private void listView1_MouseClick(object sender, MouseEventArgs e)
 {
     //单击
     try
     {
         int thisRow = listView1.FocusedItem.Index;
         if (e.Button == MouseButtons.Left && this.listView1.Items.Count > 0)
         {//查找文件名
             string imageFileName = listView1.SelectedItems[0].SubItems[8].Text;
             //文件名不能为空
             doCheck.toCheck(Tools.CheckKey.EmptyCheck, Tools.EmptyCheck_Value.notSetEmpty, imageFileName);
             //设置根目录,应该可以改变
             fileHelp.SetrepositoryPath("c:\\");
             //分析文件名以得到其路径 c:\list\1.txt => c:\list
             fileHelp.JudgeDirName(imageFileName);
             string imageFilepath = fileHelp.DateTimeDir + "\\" + imageFileName;
             //后缀是JPG
             doCheck.toCheck(Tools.CheckKey.FileCheck, Tools.FileCheck_Value.onlyPathRight_JpgSuffix, imageFilepath);
             //是否在硬盘上存在
             doCheck.toCheck(Tools.CheckKey.FileCheck, Tools.FileCheck_Value.onlyFileExist, imageFilepath);
             //发送显示图片示件
             Event_ShowImage_Issue_Records(imageFilepath);
             //MessageBox.Show(path);
         }
     }
     catch (IAmCheckException ex)
     {
         MessageBox.Show(ex.Message + "\n" + ex.StackTrace);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(ex.Message + "\n" + ex.StackTrace);
     }
 }
Esempio n. 2
0
 private void Query_barcode()
 {
     //输入条码,查询货号
     issueHelper.Recpt_Query0(t_name_itemNo.Text, ref m_item_no);
     doCheck.toCheck(CheckKey.IsZeroCheckStr, CheckStr_Vlaue.itemNo, m_item_no);
     //查询 品名 实时库存
     issueHelper.Recpt_Query1(m_item_no, ref m_item_name, ref m_realtime_stock);
 }
Esempio n. 3
0
        private void calcRealTimeStock_issueItemQty()
        {
            //发货量不应该输入0
            doCheck.toCheck(CheckKey.IsZeroCheckStr, CheckStr_Vlaue.realTimeStock, t_issueItemQty.Text);
            m_issueItemQty = t_issueItemQty.Text;
            //实时库存不能为空
            doCheck.toCheck(CheckKey.IsNullCheckStr, CheckStr_Vlaue.realTimeStock, m_realtime_stock);
            int realtimeStock = Convert.ToInt32(m_realtime_stock) - Convert.ToInt32(m_issueItemQty);

            //实时库存只能是正数和0
            doCheck.toCheck(CheckKey.PreConditonCheck, PreConditonCheck_Value.onlyPostiveNumber, realtimeStock.ToString());
            m_realtime_stock = realtimeStock.ToString();
        }