Example #1
0
        public void DelRoomPatrol(LCSite.InputRoomPatrol RoomPatrol)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from TAB_Site_RoomPatrol ");
            strSql.Append(" where strID = @strID ");
            using (var conn = GetConnection())
            {
                conn.Execute(strSql.ToString(), new { Strid = RoomPatrol.strID });
            }
        }
Example #2
0
        public void AddRoomPatrol(LCSite.InputRoomPatrol RoomPatrol)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TAB_Site_RoomPatrol");
            strSql.Append("(dtPatrolTime,nSiteID,strSiteName,nLoginType,strNumber,strPhotoID,strTrainmanID,strID,strName)");
            strSql.Append("values(@dtPatrolTime,@nSiteID,@strSiteName,@nLoginType,@strNumber,@strPhotoID,@strTrainmanID,@strID,@strName)");
            using (var conn = GetConnection())
            {
                conn.Execute(strSql.ToString(), RoomPatrol);
            }
        }
Example #3
0
        public void UpdateRoomPatrol(LCSite.InputRoomPatrol RoomPatrol)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("Update TAB_Site_RoomPatrol set ");
            strSql.Append(" dtPatrolTime = @dtPatrolTime, ");
            strSql.Append(" nSiteID = @nSiteID, ");
            strSql.Append(" strSiteName = @strSiteName, ");
            strSql.Append(" nLoginType = @nLoginType, ");
            strSql.Append(" strNumber = @strNumber, ");
            strSql.Append(" strPhotoID = @strPhotoID, ");
            strSql.Append(" strTrainmanID = @strTrainmanID, ");
            strSql.Append(" strName = @strName ");
            strSql.Append(" where strID = @strID ");
            using (var conn = GetConnection())
            {
                conn.Execute(strSql.ToString(), RoomPatrol);
            }
        }