protected void InsertBadReCordInfo(string strAlarmType, string strCarNo, string strDecript)
        {
            if (InsertState == 0)
            {
                #region 报警实体类
                CoalTraffic.Model.TT_BadRecord modelBad = new CoalTraffic.Model.TT_BadRecord();
                modelBad.AlarmType = strAlarmType;

                modelBad.BreakDate = DateTime.Now;
                modelBad.CarNo = strCarNo;
                modelBad.CollCode = "";
                modelBad.Decript = "";

                modelBad.NavicertCode = strNavicertCode;
                modelBad.RecordID = Guid.NewGuid().ToString().Replace("-", "");
                modelBad.RoomCode = strRoomCode;

                if (strIsVideo == "1")
                {
                    modelBad.FrontImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.FrontImageContent = ((DHVideo)Form1.PF.Controls["videoFrontImage"]).CapturePic();
                    modelBad.RoomImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.RoomImageContent = ((DHVideo)Form1.PF.Controls["videoRoomImage"]).CapturePic();
                    modelBad.UpImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.UpImageContent = ((DHVideo)Form1.PF.Controls["videoUpImage"]).CapturePic();
                    modelBad.BackImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.BackImageContent = ((DHVideo)Form1.PF.Controls["videoBackImage"]).CapturePic();
                }
                else
                {
                    modelBad.FrontImage = "";
                    modelBad.FrontImageContent = null;
                    modelBad.RoomImage = "";
                    modelBad.RoomImageContent = null;
                    modelBad.UpImage = "";
                    modelBad.UpImageContent = null;
                    modelBad.BackImage = "";
                    modelBad.BackImageContent = null;
                }
                #endregion

                #region 数据同步
                //MSMQClient MC = new MSMQClient();
                StringBuilder sbInsertBR = new StringBuilder();
                sbInsertBR.Append("PT_BadRecord '" + modelBad.RecordID + "','" + modelBad.NavicertCode + "','" + modelBad.RoomCode + "','" + modelBad.CarNo + "','" + modelBad.Decript + "',");
                sbInsertBR.Append("'" + modelBad.BreakDate + "','" + modelBad.AlarmType + "','" + modelBad.AlarmStatus + "','" + modelBad.CollCode + "','" + modelBad.FrontImage + "',");
                sbInsertBR.Append("'" + modelBad.FrontImageContent + "','" + modelBad.BackImage + "','" + modelBad.BackImageContent + "','" + modelBad.UpImage + "',");
                sbInsertBR.Append("'" + modelBad.UpImageContent + "','" + modelBad.RoomImage + "','" + modelBad.RoomImageContent + "'");
                MC.AddNewSqlText(sbInsertBR.ToString());
                #endregion

                string strRecordID = new CoalTraffic.BLL.TT_BadRecord().Add(modelBad);
                //添加违规记录成功,上传违规记录到服务器
                if (strRecordID != "")
                {
                    InsertState = 0;
                }
                else
                {
                    alSound.Alarm("该站的数据库异常");

                    InsertBadReCordInfo("异常", "", ini.IniReadValue("RoomSetting", "RoomName") + "的数据库异常");
                    InsertState = 0;
                }
            }
        }
        protected void InsertBadReCordInfo(string strAlarmType, string strDecript)
        {
            string isConnection = ini.IniReadValue("Connection", "isConnection");
            if (InsertState == 0)
            {
                #region 报警实体类
                CoalTraffic.Model.TT_BadRecord modelBad = new CoalTraffic.Model.TT_BadRecord();
                modelBad.AlarmType = strAlarmType;

                modelBad.BreakDate = DateTime.Now;
                modelBad.CarNo = txtCarNo.Text.Trim();
                modelBad.CollCode = strCollCode;
                modelBad.Decript = strDecript;

                modelBad.NavicertCode = "";
                modelBad.RecordID = Guid.NewGuid().ToString().Replace("-", "");
                modelBad.RoomCode = strRoomCode;

                if (StaticParameter.IsVideo == "1")
                {
                    if (byteFrontImage == null && byteBackImage == null && byteUpImage == null && byteRoomImage == null)
                    {
                        strFrontImage = Guid.NewGuid().ToString().Replace("-", "");
                        strBackImage = Guid.NewGuid().ToString().Replace("-", "");
                        strUpImage = Guid.NewGuid().ToString().Replace("-", "");
                        strRoomImage = Guid.NewGuid().ToString().Replace("-", "");

                        byteFrontImage = this.videoFrontImage.CapturePic();
                        byteBackImage = this.videoBackImage.CapturePic();
                        byteUpImage = this.videoUpImage.CapturePic();
                        byteRoomImage = this.videoRoomImage.CapturePic();
                    }

                    modelBad.FrontImage = strFrontImage;
                    modelBad.FrontImageContent = byteFrontImage;
                    modelBad.RoomImage = strRoomImage;
                    modelBad.RoomImageContent = byteRoomImage;
                    modelBad.UpImage = strUpImage;
                    modelBad.UpImageContent = byteUpImage;
                    modelBad.BackImage = strBackImage;
                    modelBad.BackImageContent = byteBackImage;
                }
                else
                {
                    modelBad.FrontImage = "";
                    modelBad.FrontImageContent = null;
                    modelBad.RoomImage = "";
                    modelBad.RoomImageContent = null;
                    modelBad.UpImage = "";
                    modelBad.UpImageContent = null;
                    modelBad.BackImage = "";
                    modelBad.BackImageContent = null;
                }
                #endregion

                string strRecordID = new CoalTraffic.BLL.TT_BadRecord().Add(modelBad);

                #region 当联网的时:插入同步sql语句到服务器,sql语句本地执行
                if (isConnection == "0")
                {
                    StringBuilder sbInsertBRLocal = new StringBuilder();
                    sbInsertBRLocal.Append("PT_BadRecord '" + modelBad.RecordID + "','" + modelBad.NavicertCode + "','" + modelBad.RoomCode + "','" + modelBad.CarNo + "','" + modelBad.Decript + "',");
                    sbInsertBRLocal.Append("'" + modelBad.BreakDate + "','" + modelBad.AlarmType + "','" + modelBad.AlarmStatus + "','" + modelBad.CollCode + "','" + modelBad.FrontImage + "',");
                    sbInsertBRLocal.Append("null,'" + modelBad.BackImage + "',null,'" + modelBad.UpImage + "',");
                    sbInsertBRLocal.Append("null,'" + modelBad.RoomImage + "',null");
                    DbHelperSQL.ExecuteSql2(sbInsertBRLocal.ToString(), "1");//sql语句本地执行

                    string sqlInsertLog = "insert [NetWorkDisconnectionLog] (ID, SQLcontext, datetime, IP) values (@ID,@SQLcontext,@datetime,@IP)";
                    SqlParameter[] sqlpars = new SqlParameter[]
                        {
                            new SqlParameter("@ID",DateTime.Now.ToString("yyyyMMddHHmmss")),
                            new SqlParameter("@SQLcontext",sbInsertBRLocal.ToString().ToString()),
                            new SqlParameter("@datetime",DateTime.Now.ToString()),
                            new SqlParameter("@IP",ini.IniReadValue("Connection","LServer"))
                        };
                    DbHelperSQL.ExecuteSql(sqlInsertLog,sqlpars); //插入同步sql语句
                }
                #endregion

                #region 当断网时,添加报警日志相关sql语句
                StringBuilder sbInsertBR = new StringBuilder();
                sbInsertBR.Append("PT_BadRecord '" + modelBad.RecordID + "','" + modelBad.NavicertCode + "','" + modelBad.RoomCode + "','" + modelBad.CarNo + "','" + modelBad.Decript + "',");
                sbInsertBR.Append("'" + modelBad.BreakDate + "','" + modelBad.AlarmType + "','" + modelBad.AlarmStatus + "','" + modelBad.CollCode + "','" + modelBad.FrontImage + "',");
                sbInsertBR.Append("null,'" + modelBad.BackImage + "',null,'" + modelBad.UpImage + "',");
                sbInsertBR.Append("null,'" + modelBad.RoomImage + "',null");
                string id = DateTime.Now.ToString("yyyyMMddHHmmss");
                StringBuilder sbsqlcontext = new StringBuilder();
                sbsqlcontext.Append("insert into NetWorkDisconnection (ID, SQLcontext, DateTime) values(@id,@sqlcontext,@datetime)");
                SqlParameter[] parameters = new SqlParameter[] {
                         new SqlParameter("@id",id),
                         new SqlParameter("@sqlcontext",sbInsertBR.ToString()),
                         new SqlParameter("@datetime",DateTime.Now)
                         };
                DbHelperSQL.ExecuteSql(sbsqlcontext.ToString(), parameters);
                #endregion

                #region 判断插入数据库是否成功
                if (strRecordID != "")
                {
                    InsertState = 0;
                }
                else
                {
                    if (isConnection == "0")
                    {
                        ini.IniWriteValue("Connection", "isConnection", CommonMethod.ToDBC("1"));
                        MessageBox.Show("本系统与服务器断开连接,请联系中心机房!", "天大天科", MessageBoxButtons.
            OK, MessageBoxIcon.Asterisk);
                        Application.ExitThread();
                        Application.Exit();
                    }
                    else
                    {
                        alSound.Alarm("该站的数据库异常");
                        MessageBox.Show("该站的数据库连接字符串配置异常", "天大天科", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        InsertState = 1;
                        InsertBadReCordInfo("异常", strRoomName + "数据库异常");
                    }
                }
                #endregion
            }
        }
        protected void InsertBadReCordInfo(string strAlarmType, string strDecript)
        {
            if (InsertState == 0)
            {
                #region 报警实体类
                CoalTraffic.Model.TT_BadRecord modelBad = new CoalTraffic.Model.TT_BadRecord();
                modelBad.AlarmType = strAlarmType;

                modelBad.BreakDate = DateTime.Now;
                modelBad.CarNo = txtCarNo.Text.Trim();
                modelBad.CollCode = strCollCode;
                modelBad.Decript = strDecript;

                modelBad.NavicertCode = "";
                modelBad.RecordID = Guid.NewGuid().ToString().Replace("-", "");
                modelBad.RoomCode = strRoomCode;

                if (StaticParameter.IsVideo == "1")
                {
                    if (byteFrontImage == null && byteBackImage == null && byteUpImage == null && byteRoomImage == null)
                    {
                        strFrontImage = Guid.NewGuid().ToString().Replace("-", "");
                        strBackImage = Guid.NewGuid().ToString().Replace("-", "");
                        strUpImage = Guid.NewGuid().ToString().Replace("-", "");
                        strRoomImage = Guid.NewGuid().ToString().Replace("-", "");

                        byteFrontImage = this.videoFrontImage.CapturePic();
                        byteBackImage = this.videoBackImage.CapturePic();
                        byteUpImage = this.videoUpImage.CapturePic();
                        byteRoomImage = this.videoRoomImage.CapturePic();
                    }

                    modelBad.FrontImage = strFrontImage;
                    modelBad.FrontImageContent = byteFrontImage;
                    modelBad.RoomImage = strRoomImage;
                    modelBad.RoomImageContent = byteRoomImage;
                    modelBad.UpImage = strUpImage;
                    modelBad.UpImageContent = byteUpImage;
                    modelBad.BackImage = strBackImage;
                    modelBad.BackImageContent = byteBackImage;
                }
                else
                {
                    modelBad.FrontImage = "";
                    modelBad.FrontImageContent = null;
                    modelBad.RoomImage = "";
                    modelBad.RoomImageContent = null;
                    modelBad.UpImage = "";
                    modelBad.UpImageContent = null;
                    modelBad.BackImage = "";
                    modelBad.BackImageContent = null;
                }
                #endregion

                #region 数据同步
                //MSMQClient MC = new MSMQClient();
                StringBuilder sbInsertBR = new StringBuilder();
                sbInsertBR.Append("PT_BadRecord '" + modelBad.RecordID + "','" + modelBad.NavicertCode + "','" + modelBad.RoomCode + "','" + modelBad.CarNo + "','" + modelBad.Decript + "',");
                sbInsertBR.Append("'" + modelBad.BreakDate + "','" + modelBad.AlarmType + "','" + modelBad.AlarmStatus + "','" + modelBad.CollCode + "','" + modelBad.FrontImage + "',");
                sbInsertBR.Append("null,'" + modelBad.BackImage + "',null,'" + modelBad.UpImage + "',");
                sbInsertBR.Append("null,'" + modelBad.RoomImage + "',null");
                MC.AddNewSqlText(MC.ServerStation + MC.Prefix + "TT_BadRecord" + MC.Prefix + MC.AddFlg + MC.Prefix + DateTime.Now.ToString("yyyy-MM-dd hh:mm;ss") + MC.Prefix + sbInsertBR.ToString());

                //发送图片
                string strIsSendPicToRoom = StaticParameter.IsSendPicToRoom;
                int iSend = MC.ServerStation;
                string strPic = "";
                if (modelBad.FrontImageContent != null)
                {
                    strPic = iSend + MC.Prefix + "Sys_FileSave" + MC.Prefix + MC.AddFlg + MC.Prefix + DateTime.Now.ToString("yyyy-MM-dd hh:mm;ss") + MC.Prefix
                        + modelBad.FrontImage + ",jpg," + Convert.ToBase64String(modelBad.FrontImageContent, 0, modelBad.FrontImageContent.Length);
                    MC.AddNewSqlText(strPic);
                }
                if (modelBad.BackImageContent != null)
                {
                    strPic = iSend + MC.Prefix + "Sys_FileSave" + MC.Prefix + MC.AddFlg + MC.Prefix + DateTime.Now.ToString("yyyy-MM-dd hh:mm;ss") + MC.Prefix
                        + modelBad.BackImage + ",jpg," + Convert.ToBase64String(modelBad.BackImageContent, 0, modelBad.BackImageContent.Length);
                    MC.AddNewSqlText(strPic);
                }
                if (modelBad.UpImageContent != null)
                {
                    strPic = iSend + MC.Prefix + "Sys_FileSave" + MC.Prefix + MC.AddFlg + MC.Prefix + DateTime.Now.ToString("yyyy-MM-dd hh:mm;ss") + MC.Prefix
                        + modelBad.UpImage + ",jpg," + Convert.ToBase64String(modelBad.UpImageContent, 0, modelBad.UpImageContent.Length);
                    MC.AddNewSqlText(strPic);
                }
                if (modelBad.RoomImageContent != null)
                {
                    strPic = iSend + MC.Prefix + "Sys_FileSave" + MC.Prefix + MC.AddFlg + MC.Prefix + DateTime.Now.ToString("yyyy-MM-dd hh:mm;ss") + MC.Prefix
                        + modelBad.RoomImage + ",jpg," + Convert.ToBase64String(modelBad.RoomImageContent, 0, modelBad.RoomImageContent.Length);
                    MC.AddNewSqlText(strPic);
                }
                #endregion

                string strRecordID = new CoalTraffic.BLL.TT_BadRecord().Add(modelBad);
                //添加违规记录成功,上传违规记录到服务器
                if (strRecordID != "")
                {
                    InsertState = 0;
                }
                else
                {
                    alSound.Alarm("该站的数据库异常");
                    InsertState = 1;
                    InsertBadReCordInfo("异常", strRoomName + "数据库异常");

                }
            }
        }
        protected void InsertBadReCordInfo(string strAlarmType, string strCarNo, string strDecript)
        {
            string isConnection = ini.IniReadValue("Connection", "isConnection");
            if (InsertState == 0)
            {
                #region 报警实体类
                CoalTraffic.Model.TT_BadRecord modelBad = new CoalTraffic.Model.TT_BadRecord();
                modelBad.AlarmType = strAlarmType;

                modelBad.BreakDate = DateTime.Now;
                modelBad.CarNo = strCarNo;
                modelBad.CollCode = "";
                modelBad.Decript = "";

                modelBad.NavicertCode = strNavicertCode;
                modelBad.RecordID = Guid.NewGuid().ToString().Replace("-", "");
                modelBad.RoomCode = strRoomCode;

                if (strIsVideo == "1")
                {
                    modelBad.FrontImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.FrontImageContent = ((DHVideo)Form1.PF.Controls["videoFrontImage"]).CapturePic();
                    modelBad.RoomImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.RoomImageContent = ((DHVideo)Form1.PF.Controls["videoRoomImage"]).CapturePic();
                    modelBad.UpImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.UpImageContent = ((DHVideo)Form1.PF.Controls["videoUpImage"]).CapturePic();
                    modelBad.BackImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.BackImageContent = ((DHVideo)Form1.PF.Controls["videoBackImage"]).CapturePic();
                }
                else
                {
                    modelBad.FrontImage = "";
                    modelBad.FrontImageContent = null;
                    modelBad.RoomImage = "";
                    modelBad.RoomImageContent = null;
                    modelBad.UpImage = "";
                    modelBad.UpImageContent = null;
                    modelBad.BackImage = "";
                    modelBad.BackImageContent = null;
                }
                #endregion

                #region 数据同步
                //MSMQClient MC = new MSMQClient();
                StringBuilder sbInsertBR = new StringBuilder();
                sbInsertBR.Append("PT_BadRecord '" + modelBad.RecordID + "','" + modelBad.NavicertCode + "','" + modelBad.RoomCode + "','" + modelBad.CarNo + "','" + modelBad.Decript + "',");
                sbInsertBR.Append("'" + modelBad.BreakDate + "','" + modelBad.AlarmType + "','" + modelBad.AlarmStatus + "','" + modelBad.CollCode + "','" + modelBad.FrontImage + "',");
                sbInsertBR.Append("'" + modelBad.FrontImageContent + "','" + modelBad.BackImage + "','" + modelBad.BackImageContent + "','" + modelBad.UpImage + "',");
                sbInsertBR.Append("'" + modelBad.UpImageContent + "','" + modelBad.RoomImage + "','" + modelBad.RoomImageContent + "'");
                if (isConnection == "0")
                {
                    mqServer.AddMsmq(sbInsertBR.ToString());
                }
                else
                {
                    MC.AddNewSqlText(sbInsertBR.ToString());
                }
                #endregion

                string strRecordID = new CoalTraffic.BLL.TT_BadRecord().Add(modelBad);
                //添加违规记录成功,上传违规记录到服务器
                if (strRecordID != "")
                {
                    InsertState = 0;
                }
                else
                {
                    if (isConnection == "0")
                    {
                        //ini.IniWriteValue("Connection", "isConnection", CommonMethod.ToDBC("1"));
                        //MessageBox.Show("系统与服务器断开连接,请重新登陆系统!");
                        MessageBox.Show("系统与服务器断开连接,请联系中心机房!");
                        Application.ExitThread();
                        Application.Exit();
                    }
                    else
                    {
                        alSound.Alarm("该站的数据库异常");

                        InsertBadReCordInfo("异常", "", ini.IniReadValue("RoomSetting", "RoomName") + "的数据库异常");
                        InsertState = 0;
                    }
                }
            }
        }
        /// <summary>
        /// �õ�һ������ʵ��
        /// </summary>
        public CoalTraffic.Model.TT_BadRecord GetModel(string RecordID)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("select  top 1 RecordID,NavicertCode,RoomCode,CarNo,Decript,BreakDate,AlarmType,AlarmStatus,CollCode,FrontImage,BackImage,UpImage,RoomImage from TT_BadRecord ");
            strSql.Append(" where RecordID=@RecordID ");
            SqlParameter[] parameters = {
                    new SqlParameter("@RecordID", SqlDbType.VarChar,50)};
            parameters[0].Value = RecordID;

            CoalTraffic.Model.TT_BadRecord model = new CoalTraffic.Model.TT_BadRecord();
            DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
            if(ds.Tables[0].Rows.Count>0)
            {
                model.RecordID=ds.Tables[0].Rows[0]["RecordID"].ToString();
                model.NavicertCode=ds.Tables[0].Rows[0]["NavicertCode"].ToString();
                model.RoomCode=ds.Tables[0].Rows[0]["RoomCode"].ToString();
                model.CarNo=ds.Tables[0].Rows[0]["CarNo"].ToString();
                model.Decript=ds.Tables[0].Rows[0]["Decript"].ToString();
                if(ds.Tables[0].Rows[0]["BreakDate"].ToString()!="")
                {
                    model.BreakDate=DateTime.Parse(ds.Tables[0].Rows[0]["BreakDate"].ToString());
                }
                model.AlarmType=ds.Tables[0].Rows[0]["AlarmType"].ToString();
                model.AlarmStatus=ds.Tables[0].Rows[0]["AlarmStatus"].ToString();
                model.CollCode=ds.Tables[0].Rows[0]["CollCode"].ToString();
                model.FrontImage=ds.Tables[0].Rows[0]["FrontImage"].ToString();
                model.BackImage=ds.Tables[0].Rows[0]["BackImage"].ToString();
                model.UpImage=ds.Tables[0].Rows[0]["UpImage"].ToString();
                model.RoomImage=ds.Tables[0].Rows[0]["RoomImage"].ToString();
                return model;
            }
            else
            {
            return null;
            }
        }
        protected void InsertBadReCordInfo(string strAlarmType, string strCarNo, string strDecript)
        {
            if (InsertState == 0)
            {
                #region ����ʵ����
                CoalTraffic.Model.TT_BadRecord modelBad = new CoalTraffic.Model.TT_BadRecord();
                modelBad.AlarmType = strAlarmType;

                modelBad.BreakDate = DateTime.Now;
                modelBad.CarNo = strCarNo;
                modelBad.CollCode = strCollCode;
                modelBad.Decript = strDecript;

                modelBad.NavicertCode = strNavicertCode;
                modelBad.RecordID = Guid.NewGuid().ToString().Replace("-", "");
                modelBad.RoomCode = strRoomCode;

                if (strIsVideo == "1")
                {
                    modelBad.FrontImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.FrontImageContent = ((DHVideo)Form1.PF.Controls["videoFrontImage"]).CapturePic();
                    modelBad.RoomImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.RoomImageContent = ((DHVideo)Form1.PF.Controls["videoRoomImage"]).CapturePic();
                    modelBad.UpImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.UpImageContent = ((DHVideo)Form1.PF.Controls["videoUpImage"]).CapturePic();
                    modelBad.BackImage = Guid.NewGuid().ToString().Replace("-", "");
                    modelBad.BackImageContent = ((DHVideo)Form1.PF.Controls["videoBackImage"]).CapturePic();
                }
                else
                {
                    modelBad.FrontImage = "";
                    modelBad.FrontImageContent = null;
                    modelBad.RoomImage = "";
                    modelBad.RoomImageContent = null;
                    modelBad.UpImage = "";
                    modelBad.UpImageContent = null;
                    modelBad.BackImage = "";
                    modelBad.BackImageContent = null;
                }
                #endregion

                #region ����ͬ��
                //MSMQClient MC = new MSMQClient();
                StringBuilder sbInsertBR = new StringBuilder();
                sbInsertBR.Append("PT_BadRecord '" + modelBad.RecordID + "','" + modelBad.NavicertCode + "','" + modelBad.RoomCode + "','" + modelBad.CarNo + "','" + modelBad.Decript + "',");
                sbInsertBR.Append("'" + modelBad.BreakDate + "','" + modelBad.AlarmType + "','" + modelBad.AlarmStatus + "','" + modelBad.CollCode + "','" + modelBad.FrontImage + "',");
                sbInsertBR.Append("'" + modelBad.FrontImageContent + "','" + modelBad.BackImage + "','" + modelBad.BackImageContent + "','" + modelBad.UpImage + "',");
                sbInsertBR.Append("'" + modelBad.UpImageContent + "','" + modelBad.RoomImage + "','" + modelBad.RoomImageContent + "'");
                MC.AddNewSqlText(MC.ServerStation + MC.Prefix + "TT_BadRecord" + MC.Prefix + MC.AddFlg + MC.Prefix + DateTime.Now.ToString("yyyy-MM-dd hh:mm;ss") + MC.Prefix + sbInsertBR.ToString());
                #endregion

                string strRecordID = new CoalTraffic.BLL.TT_BadRecord().Add(modelBad);
                //���Υ���¼�ɹ����ϴ�Υ���¼��������
                if (strRecordID != "")
                {
                    InsertState = 0;
                }
                else
                {
                    alarmSound.Alarm("��վ�����ݿ��쳣");

                    InsertBadReCordInfo("�쳣", "", strRoomName + "�����ݿ��쳣");
                    InsertState = 0;
                }
            }
        }