/// <summary> /// 照片查看 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void but_dis_media_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; } try { 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_manage_image HCSCM_set_manage_image = new HCSCM_set_manage_image(sortedList); //获取一个值,指是否在Windows任务栏中显示窗体。 HCSCM_set_manage_image.ShowInTaskbar = false; HCSCM_set_manage_image.ShowDialog(); } catch { MessageBox.Show("数据异常,请检测。", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }
/// <summary> /// 照片查看 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void but_dis_media_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(); //如果当前选择的行 小于等于 0,表示用户当前未选择任意一行 if (this.dgv_01.SelectedRows.Count <= 0) { return; } //dgv_01.SelectedRows[0] //获得实体包ID int packId = Convert.ToInt32(dgv_01.SelectedRows[0].Cells["id"].Value); CnasRemotCall reCnasRemotCall = new CnasRemotCall(); SortedList sttemp01 = new SortedList(); sttemp01.Add(1, packId); // string sql = reCnasRemotCall.RemotInterface.CheckSelectData("HCS-set-sec004", sttemp01); //根据实体包ID获得实体包信息 DataTable getdt = reCnasRemotCall.RemotInterface.SelectData("HCS-set-sec005", sttemp01); //设置一个类型,表明这次上传图片的类型是:包 sortedList.Add("type", "1"); //包ID sortedList.Add("pack_id", getdt.Rows[0]["id"].ToString()); HCSCM_set_manage_image HCSCM_set_manage_image = new HCSCM_set_manage_image(sortedList); //获取一个值,指是否在Windows任务栏中显示窗体。 HCSCM_set_manage_image.ShowInTaskbar = false; HCSCM_set_manage_image.ShowDialog(); }