/// <summary>
        /// 重新窗体消息处理函数
        /// </summary>
        /// <param name="m">窗体消息</param>
        protected override void DefWndProc(ref Message m)
        {
            switch (m.Msg)
            {
            //接收自定义消息,放弃未提交的单据号
            case WndMsgSender.CloseMsg:
                // 放弃未使用的单据号
                m_billNoControl.CancelBill();
                break;

            case WndMsgSender.PositioningMsg:
                WndMsgData msg      = new WndMsgData();     //这是创建自定义信息的结构
                Type       dataType = msg.GetType();

                msg = (WndMsgData)m.GetLParam(dataType);    //这里获取的就是作为LParam参数发送来的信息的结构

                DataTable dtMessage = UniversalFunction.PositioningOneRecord(msg.MessageContent, "不合格品隔离处置单");

                if (dtMessage.Rows.Count == 0)
                {
                    m_billMessageServer.DestroyMessage(msg.MessageContent);
                    MessageDialog.ShowPromptMessage("未找到相关记录");
                }
                else
                {
                    RefreshDataGirdView(GlobalObject.DataConverter.DataTableToList <View_S_IsolationManageBill>(dtMessage));

                    dataGridView1.Rows[0].Selected = true;
                }

                break;

            default:
                base.DefWndProc(ref m);
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 重新窗体消息处理函数
        /// </summary>
        /// <param name="m">窗体消息</param>
        protected override void DefWndProc(ref Message m)
        {
            switch (m.Msg)
            {
            //接收自定义消息,放弃未提交的单据号
            case WndMsgSender.CloseMsg:
                break;

            case WndMsgSender.PositioningMsg:
                WndMsgData msg      = new WndMsgData();     //这是创建自定义信息的结构
                Type       dataType = msg.GetType();

                msg = (WndMsgData)m.GetLParam(dataType);    //这里获取的就是作为LParam参数发送来的信息的结构

                DataTable dtMessage = UniversalFunction.PositioningOneRecord(msg.MessageContent, "重新打印");

                if (dtMessage.Rows.Count == 0)
                {
                    Flow_BillFlowMessage billmsg = m_billFlowMsg.GetMessage(BasicInfo.LoginID, "重新打印", msg.MessageContent);

                    m_billFlowMsg.DestroyMessage(BasicInfo.LoginID, billmsg.序号);

                    MessageDialog.ShowPromptMessage("未找到相关记录");
                }
                else
                {
                    dgvShowInfo.DataSource       = dtMessage;
                    dgvShowInfo.Rows[0].Selected = true;
                }

                break;

            default:
                base.DefWndProc(ref m);
                break;
            }
        }
        /// <summary>
        /// 重新窗体消息处理函数
        /// </summary>
        /// <param name="m">窗体消息</param>
        protected override void DefWndProc(ref Message m)
        {
            switch (m.Msg)
            {
            //接收自定义消息,放弃未提交的单据号

            case WndMsgSender.CloseMsg:
                // 放弃未使用的单据号
                m_billNoControl.CancelBill();
                break;

            case WndMsgSender.PositioningMsg:
                WndMsgData msg      = new WndMsgData();     //这是创建自定义信息的结构
                Type       dataType = msg.GetType();

                msg = (WndMsgData)m.GetLParam(dataType);    //这里获取的就是作为LParam参数发送来的信息的结构

                DataTable dtMessage = UniversalFunction.PositioningOneRecord(msg.MessageContent, "工装验证报告单");

                if (dtMessage.Rows.Count == 0)
                {
                    m_msgPromulgator.DestroyMessage(msg.MessageContent);
                    MessageDialog.ShowPromptMessage("未找到相关记录");
                }
                else
                {
                    dataGridView1.DataSource       = dtMessage;
                    dataGridView1.Rows[0].Selected = true;
                }

                break;

            default:
                base.DefWndProc(ref m);
                break;
            }
        }
        /// <summary>
        /// 重新窗体消息处理函数
        /// </summary>
        /// <param name="message">窗体消息</param>
        protected override void DefWndProc(ref Message message)
        {
            switch (message.Msg)
            {
            case WndMsgSender.ShowSpecificData:     // 显示特定数据的消息

                WndMsgData msg1      = new WndMsgData();
                Type       dataType1 = msg1.GetType();

                msg1 = (WndMsgData)message.GetLParam(dataType1);

                // 人员工号
                string workID = (string)GeneralFunction.IntPtrToClass(msg1.ObjectMessage, msg1.BytesOfObjectMessage);

                PositioningRecord(workID);

                break;

            case WndMsgSender.WarningNotice:        // 系统预警消息

                WndMsgData msg2      = new WndMsgData();
                Type       dataType2 = msg2.GetType();

                msg2 = (WndMsgData)message.GetLParam(dataType2);

                // 预警数据
                List <string> lstData = (List <string>)GeneralFunction.IntPtrToClass(msg2.ObjectMessage, msg2.BytesOfObjectMessage);

                PositioningRecord(lstData[0]);

                break;

            default:
                base.DefWndProc(ref message);
                break;
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 重新窗体消息处理函数
        /// </summary>
        /// <param name="m">窗体消息</param>
        protected override void DefWndProc(ref Message m)
        {
            switch (m.Msg)
            {
            //接收自定义消息,放弃未提交的单据号
            case WndMsgSender.CloseMsg:
                break;

            case WndMsgSender.PositioningMsg:
                WndMsgData msg      = new WndMsgData();     //这是创建自定义信息的结构
                Type       dataType = msg.GetType();

                msg = (WndMsgData)m.GetLParam(dataType);    //这里获取的就是作为LParam参数发送来的信息的结构

                DataTable dtMessage = UniversalFunction.PositioningOneRecord(msg.MessageContent, "采购计划");

                if (dtMessage.Rows.Count == 0)
                {
                    m_msgPromulgator.DestroyMessage(msg.MessageContent);
                    MessageDialog.ShowPromptMessage("未找到相关记录");
                }
                else
                {
                    cmbYear.Text  = msg.MessageContent.ToString().Substring(0, 4);
                    cmbMonth.Text = msg.MessageContent.ToString().Substring(4, 2);
                    btnFind_Click(null, null);
                    //dataGridView1.DataSource = dtMessage;
                }

                break;

            default:
                base.DefWndProc(ref m);
                break;
            }
        }
        /// <summary>
        /// 重新窗体消息处理函数
        /// </summary>
        /// <param name="m">窗体消息</param>
        protected override void DefWndProc(ref Message m)
        {
            switch (m.Msg)
            {
            //接收自定义消息,放弃未提交的单据号
            case WndMsgSender.CloseMsg:
                m_serverQualityProblem.DeleteExcessSchedule(out m_strErr);
                // 放弃未使用的单据号
                break;

            case WndMsgSender.PositioningMsg:
                WndMsgData msg      = new WndMsgData();     //这是创建自定义信息的结构
                Type       dataType = msg.GetType();

                msg = (WndMsgData)m.GetLParam(dataType);    //这里获取的就是作为LParam参数发送来的信息的结构

                DataTable dtMessage = UniversalFunction.PositioningOneRecord(msg.MessageContent, "质量问题整改处置单");

                if (dtMessage.Rows.Count == 0)
                {
                    m_billMessageServer.DestroyMessage(msg.MessageContent);
                    MessageDialog.ShowPromptMessage("未找到相关记录");
                }
                else
                {
                    dataGridView1.DataSource       = dtMessage;
                    dataGridView1.Rows[0].Selected = true;
                }

                break;

            default:
                base.DefWndProc(ref m);
                break;
            }
        }