示例#1
0
        public void receiveSms(string phoneNum, PDUData pduData)
        {
            DataGridViewRow d = new DataGridViewRow();
            d.CreateCells(dataGridView1, phoneNum, pduData.getOA(), pduData.getTimeStamp(), pduData.getMsg());
            dataGridView1.Rows.Insert(0,d);

            if (dataGridView1.Rows.Count - 1 > 5)
            {
                dataGridView1.Rows.RemoveAt(5);
            }
        }
        private string saveSms(PDUData pduData)
        {
            string sqlstr = "insert into mo_999 (dest,src,cmd,time) values (" +
                            "'" + this.phoneNum + "'"
                            + ",'" + pduData.getOA() + "'"
                            + ",'" + pduData.getMsg() + "'"
                            + ",now())";

            Console.WriteLine("aaaaaaaaaaaaaaaaaaaaaaa" + sqlstr);

            MySQLConnection conn = getConn();
            MySQLCommand    comm = new MySQLCommand(sqlstr, conn);

            comm.ExecuteNonQuery();

            return(sqlstr);
        }
        private void receiveSms(PDUData pduData)
        {
            log("RECV:[" + pduData.ToString() + "]");
            log("PDUDATA:[" + pduData.getPUDType() + "],[" + pduData.getOA() + "],[" + pduData.getDcs() + "],[" + pduData.getMsg() + "],[" + pduData.getTimeStamp() + "]");
            string saveRs = saveSms(pduData);

            log("入表:" + saveRs);

            form.receiveSms(phoneNum, pduData);
        }
示例#4
0
        public void receiveSms(string phoneNum, PDUData pduData)
        {
            DataGridViewRow d = new DataGridViewRow();

            d.CreateCells(dataGridView1, phoneNum, pduData.getOA(), pduData.getTimeStamp(), pduData.getMsg());
            dataGridView1.Rows.Insert(0, d);

            if (dataGridView1.Rows.Count - 1 > 5)
            {
                dataGridView1.Rows.RemoveAt(5);
            }
        }
        private string saveSms(PDUData pduData)
        {
            string sqlstr = "insert into mo_999 (dest,src,cmd,time) values (" +
                                "'" + this.phoneNum + "'"
                                + ",'" + pduData.getOA() + "'"
                                + ",'" + pduData.getMsg() + "'"
                                + ",now())";
            Console.WriteLine("aaaaaaaaaaaaaaaaaaaaaaa"+sqlstr);

            MySQLConnection conn = getConn();
            MySQLCommand comm = new MySQLCommand(sqlstr, conn);
            comm.ExecuteNonQuery();

            return sqlstr;
        }
        private void receiveSms(PDUData pduData)
        {
            log("RECV:[" + pduData.ToString() + "]");
            log("PDUDATA:[" + pduData.getPUDType() + "],[" + pduData.getOA() + "],[" + pduData.getDcs()+ "],[" + pduData.getMsg() + "],[" + pduData.getTimeStamp() + "]");
            string saveRs = saveSms(pduData);
            log("����" + saveRs);

            form.receiveSms(phoneNum, pduData);
        }