Пример #1
0
        /// <summary>
        /// 清空患者行
        /// </summary>
        private void ClearPatientRow(DisplayController displayController, string screenIp, int screenPort)
        {
            try
            {
                MsgPatientRow patientRow = new MsgPatientRow();
                patientRow.RowAddress = BitConverter.GetBytes(GetScreenAddress(ScreenMsgType.PatientRow));
                Array.Reverse(patientRow.RowAddress);

                patientRow.WardName    = GetStandandArray(patientRow, "WardName", string.Empty);
                patientRow.PatientName = GetStandandArray(patientRow, "PatientName", string.Empty);
                patientRow.LabelNoMark = GetStandandArray(patientRow, "LabelNoMark", string.Empty);
                patientRow.LabelNo     = GetStandandArray(patientRow, "LabelNo", string.Empty);

                PackSendData(displayController, screenIp, screenPort, patientRow);//发送
            }
            catch (Exception ex)
            {
                InternalLogger.Log.Error("清空患者行出错:" + ex.Message);
            }
        }
Пример #2
0
        /// <summary>
        /// 发送患者信息行到屏
        /// </summary>
        private void SendPatientRow(DisplayController displayController, string screenIp, int screenPort, string labelNo, DataSet dsLableInfo)
        {
            try
            {
                MsgPatientRow patientRow = new MsgPatientRow();

                patientRow.RowAddress = BitConverter.GetBytes(GetScreenAddress(ScreenMsgType.PatientRow));
                Array.Reverse(patientRow.RowAddress);

                patientRow.WardName    = GetStandandArray(patientRow, "WardName", dsLableInfo.Tables[0].Rows[0]["WardName"].ToString());
                patientRow.PatientName = GetStandandArray(patientRow, "PatientName",
                                                          GetGBK2312String(dsLableInfo.Tables[0].Rows[0]["PatName"].ToString()));
                patientRow.LabelNoMark = GetStandandArray(patientRow, "LabelNoMark", "瓶签:");
                patientRow.LabelNo     = GetStandandArray(patientRow, "LabelNo", labelNo);

                PackSendData(displayController, screenIp, screenPort, patientRow);//发送
            }
            catch (Exception ex)
            {
                InternalLogger.Log.Error("发送患者信息行到屏出错:" + ex.Message);
            }
        }
Пример #3
0
        static void testSizeOf()
        {
            MsgChareResRow t = new MsgChareResRow();

            Console.WriteLine("MsgChareResRow(50):" + Marshal.SizeOf(t).ToString());

            MsgDEmployeeRow t1 = new MsgDEmployeeRow();

            Console.WriteLine("MsgDEmployeeRow(38):" + Marshal.SizeOf(t1).ToString());

            MsgDrugRow t2 = new MsgDrugRow();

            Console.WriteLine("MsgDrugRow(116):" + Marshal.SizeOf(t2).ToString());

            MsgPatientRow t3 = new MsgPatientRow();

            Console.WriteLine("MsgPatientRow(92):" + Marshal.SizeOf(t3).ToString());

            MsgGeneral t4 = new MsgGeneral();

            Console.WriteLine("MsgGeneral(4):" + Marshal.SizeOf(t4).ToString());
        }