Esempio n. 1
0
        /// <summary>
        /// 清空药师信息
        /// </summary>
        /// <param name="displayController"></param>
        /// <param name="screenIp"></param>
        /// <param name="screenPort"></param>
        /// <param name="employeeName"></param>
        /// <param name="MixCount"></param>
        private void ClearEmployeeRow(DisplayController displayController, string screenIp, int screenPort)
        {
            try
            {
                MsgDEmployeeRow employeeRow = new MsgDEmployeeRow();

                employeeRow.RowAddress = BitConverter.GetBytes(GetScreenAddress(ScreenMsgType.EmployeeRow));
                Array.Reverse(employeeRow.RowAddress);//大小端转换
                employeeRow.EmployeeNameMark = GetStandandArray(employeeRow, "EmployeeNameMark", string.Empty);
                employeeRow.MixCountMark     = GetStandandArray(employeeRow, "MixCountMark", string.Empty);
                employeeRow.EmployeeName     = GetStandandArray(employeeRow, "EmployeeName", string.Empty);
                employeeRow.MixCount         = GetStandandArray(employeeRow, "MixCount", string.Empty);
                employeeRow.ShowTime         = GetStandandTime(employeeRow, "ShowTime");

                PackSendData(displayController, screenIp, screenPort, employeeRow);//发送药师信息到屏
            }
            catch (Exception ex)
            {
                InternalLogger.Log.Error("清空药师信息出错:" + ex.Message);
            }
        }
Esempio n. 2
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());
        }