Exemplo n.º 1
0
        private void btnImageUpload_Click(object sender, EventArgs e)
        {
            string strLotNumber = txtLotNumber.Text.Trim();

            if (!string.IsNullOrEmpty(strLotNumber))
            {
                string strImageFullPath = CommonFun.GetFullPath(txtSourceImagePath.Text.Trim(), _deviceElement.SourceImagePathFormat);
                string strFileName      = strImageFullPath + strLotNumber + "." + _deviceElement.ImageExtensionName;
                string strResult        = CommonFun.UploadFile(strFileName, _deviceElement);
                txtLotNumber.Text = "";
                richTextBox1.Text = strResult + "\n" + richTextBox1.Text;
            }
            else
            {
                MessageBox.Show("批次号不能为空!");
            }
        }