コード例 #1
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public MyNet.DataAccess.Model.RoadInfo GetModel(string roadid)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select roadid,dlbh,dlmc,dllx,ssxq,gxsj,ismark from t_gis_road ");
            strSql.Append(" where roadid='" + roadid + "'");

            MyNet.DataAccess.Model.RoadInfo model = new MyNet.DataAccess.Model.RoadInfo();
            DataSet ds = dataAccess.Get_DataSet(strSql.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
コード例 #2
0
        /// <summary>
        /// 获取卡口信息
        /// </summary>
        /// <param name="strWhere">查询条件</param>
        /// <returns></returns>
        private DataSet GetListPassCar(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("SELECT A.*,B.STATION_NAME,B.xpoint,B.ypoint,C.CODEDESC CLLXNAME,d.DIRECTION_NAME  FROM T_TGS_PASSCAR A INNER JOIN (SELECT ba.*,bb.xpoint,bb.ypoint FROM T_CFG_SET_STATION ba LEFT JOIN t_gis_device_mark bb ON ba.STATION_ID=bb.relationid) B ON A.KKID=B.STATION_ID INNER JOIN (SELECT * FROM T_SYS_CODE WHERE CODETYPE='140001') C ON A.CLLX=C.CODE");
            strSql.Append(" INNER JOIN t_cfg_direction d ON a.kkid=d.station_id AND a.fxbh=d.direction_id");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by gwsj");

            return(dataAccess.Get_DataSet(strSql.ToString()));
        }
コード例 #3
0
        public DataSet GetClpp()
        {
            StringBuilder strSql = new StringBuilder();

            try
            {
                strSql.Append("SELECT * FROM  t_vehicle_brand ");
                return(dataAccess.Get_DataSet(strSql.ToString()));
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(strSql + ex.Message);
                return(null);
            }
        }