Пример #1
0
        /// <summary>
        /// 添加包的信息
        /// </summary>
        public override void AddSetMessage()
        {
            string code = Convert.ToString(setNameTxt.Tag);

            if (code.Length > 3)
            {
                HCSSM_set_message_new setMessageDialog = new HCSSM_set_message_new(1, PdCode);
                setMessageDialog.PackageBarCode = code;
                setMessageDialog.ViewData       = setMessageDialog.ViewData ?? new SortedList();
                if (setMessageDialog.ViewData.Contains("UserInfo"))
                {
                    setMessageDialog.ViewData["UserInfo"] = UserInfo;
                }
                else
                {
                    setMessageDialog.ViewData.Add("UserInfo", UserInfo);
                }
                setMessageDialog.Show();
            }
        }
Пример #2
0
 /// <summary>
 /// 响应编辑操作
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void btnEdit_Click(object sender, EventArgs e)
 {
     //数据准备
     try
     {
         if (dgv_01.CurrentRow != null && dgv_01.SelectedRows != null && dgv_01.SelectedRows.Count > 0)
         {
             HCSSM_set_message_new modifiedDialog = new HCSSM_set_message_new(2, dgv_01.SelectedRows[0].Cells["write_procedure"].Value.ToString());
             modifiedDialog.PackageBarCode = dgv_01.SelectedRows[0].Cells["bar_code"].Value.ToString();
             modifiedDialog.UserBarCode    = User_bCode;
             modifiedDialog.MessageId      = int.Parse(dgv_01.SelectedRows[0].Cells["id"].Value.ToString());
             modifiedDialog.ShowDialog();
         }
         else
         {
             MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("choicechange", EnumPromptMessage.warning, new string[] { "修改", "器械包信息" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #3
0
        public virtual void AddSetMessage()
        {
            DataGridView setDataGrid = CnasUtilityTools.FindControl <DataGridView>(this, "setDataGrid");

            if (setDataGrid != null)
            {
                if (setDataGrid.SelectedRows != null && setDataGrid.SelectedRows.Count == 1)
                {
                    if (setDataGrid.Columns.Contains("setBarCodeCol"))
                    {
                        string setBarCode = setDataGrid.SelectedRows[0].Cells["setBarCodeCol"].Value.ToString();
                        HCSSM_set_message_new setMessageDialog = new HCSSM_set_message_new(1, PdCode);
                        setMessageDialog.PackageBarCode = setBarCode;
                        setMessageDialog.ViewData       = setMessageDialog.ViewData ?? new SortedList();

                        if (setMessageDialog.ViewData.Contains("UserInfo"))
                        {
                            setMessageDialog.ViewData["UserInfo"] = UserInfo;
                        }
                        else
                        {
                            setMessageDialog.ViewData.Add("UserInfo", UserInfo);
                        }
                        setMessageDialog.Show();
                    }
                }
                else
                {
                    MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("selectset", EnumPromptMessage.warning), "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else
            {
                MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("notfindSetGrid", EnumPromptMessage.error), "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }