Ejemplo n.º 1
0
        /// <summary>
        /// Deletes a LocationQuads record
        /// </summary>
        public static int Delete(LocationQuadsDO DO)
        {
            SqlParameter _PermitKey = new SqlParameter("PermitKey", SqlDbType.Int);
            SqlParameter _QuadrangleID = new SqlParameter("QuadrangleID", SqlDbType.VarChar);

            _PermitKey.Value = DO.PermitKey;
            _QuadrangleID.Value = DO.QuadrangleID;

            SqlParameter[] _params = new SqlParameter[] {
                _PermitKey,
                _QuadrangleID
            };

            return DataCommon.ExecuteScalar("[dbo].[LocationQuads_Delete]", _params, "dbo");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new LocationQuads record
        /// </summary>
        public static void Create(LocationQuadsDO DO)
        {
            SqlParameter _PermitKey = new SqlParameter("PermitKey", SqlDbType.Int);
            SqlParameter _QuadrangleID = new SqlParameter("QuadrangleID", SqlDbType.VarChar);

            _PermitKey.Value = DO.PermitKey;
            _QuadrangleID.Value = DO.QuadrangleID;

            SqlParameter[] _params = new SqlParameter[] {
                _PermitKey,
                _QuadrangleID
            };

            DataCommon.ExecuteNonQuery("[dbo].[LocationQuads_Insert]", _params, "dbo");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets all LocationQuads records
        /// </summary>
        public static LocationQuadsDO[] GetAll()
        {
            SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[LocationQuads_GetAll]", new SqlParameter[] { }, "dbo");

            List<LocationQuadsDO> objs = new List<LocationQuadsDO>();

            while(sr.Read()){

                LocationQuadsDO obj = new LocationQuadsDO();

                obj.PermitKey = sr.GetInt32(sr.GetOrdinal("PermitKey"));
                obj.QuadrangleID = sr.GetString(sr.GetOrdinal("QuadrangleID"));

                objs.Add(obj);
            }

            return objs.ToArray();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Selects LocationQuads records by PK
        /// </summary>
        public static LocationQuadsDO[] GetByPK(Int32 PermitKey,
 String QuadrangleID)
        {
            SqlParameter _PermitKey = new SqlParameter("PermitKey", SqlDbType.Int);
            SqlParameter _QuadrangleID = new SqlParameter("QuadrangleID", SqlDbType.VarChar);

            _PermitKey.Value = PermitKey;
            _QuadrangleID.Value = QuadrangleID;

            SqlParameter[] _params = new SqlParameter[] {
                _PermitKey,
                _QuadrangleID
            };

            SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[LocationQuads_GetByPK]", _params, "dbo");

            List<LocationQuadsDO> objs = new List<LocationQuadsDO>();

            while(sr.Read())
            {
                LocationQuadsDO obj = new LocationQuadsDO();

                obj.PermitKey = sr.GetInt32(sr.GetOrdinal("PermitKey"));
                obj.QuadrangleID = sr.GetString(sr.GetOrdinal("QuadrangleID"));

                objs.Add(obj);
            }

            return objs.ToArray();
        }