예제 #1
0
        private void but_imput_Click(object sender, EventArgs e)
        {
            if (this.dgv_01.SelectedRows.Count <= 0)
            {
                MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("choicechange", EnumPromptMessage.warning, new string[] { "导入照片", "基本包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            SortedList sortedList = new SortedList();

            //设置一个类型,表明这次上传图片的类型是:包
            sortedList.Add("type", "1");
            //包ID
            sortedList.Add("pack_id", this.dgv_01.SelectedRows[0].Cells["id"].Value);
            //包的条码
            sortedList.Add("pack_barcode", this.dgv_01.SelectedRows[0].Cells["bar_code"].Value);

            HCSCM_set_image_batch HCSCM_set_image_batch = new HCSCM_set_image_batch(sortedList);

            //获取一个值,指是否在Windows任务栏中显示窗体。
            HCSCM_set_image_batch.ShowInTaskbar = false;
            HCSCM_set_image_batch.ShowDialog();
        }
        private void but_imput_Click(object sender, EventArgs e)
        {
            if (dgv_01.SelectedRows.Count > 0)
            {
                SortedList sortedList = new SortedList();

                //设置一个类型,表明这次上传图片的类型是:包
                sortedList.Add("type", "2");
                //包ID
                sortedList.Add("pack_id", this.dgv_01.SelectedRows[0].Cells["id"].Value);
                //包的条码
                sortedList.Add("pack_barcode", "");

                HCSCM_set_image_batch HCSCM_set_image_batch = new HCSCM_set_image_batch(sortedList);
                //获取一个值,指是否在Windows任务栏中显示窗体。
                HCSCM_set_image_batch.ShowInTaskbar = false;
                HCSCM_set_image_batch.ShowDialog();
            }
            else
            {
                MessageBox.Show("请选择一行数据", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }