Exemple #1
0
        /// <summary>
        /// <工作面>信息登录
        /// </summary>
        /// <param name="workingFaceEntity"><工作面>实体</param>
        /// <returns>成功与否:true,false</returns>
        public static bool insertWorkingFaceInfo(WorkingFaceEntityNew workingFaceEntity)
        {
            StringBuilder sqlStr = new StringBuilder();

            sqlStr.Append("INSERT INTO " + WorkingFaceDbConstNamesNew.TABLE_NAME);
            sqlStr.Append(" (" + WorkingFaceDbConstNamesNew.WORKINGFACE_NAME);
            sqlStr.Append(", " + WorkingFaceDbConstNamesNew.MININGAREA_ID);
            sqlStr.Append(", " + WorkingFaceDbConstNamesNew.COORDINATE_X);
            sqlStr.Append(", " + WorkingFaceDbConstNamesNew.COORDINATE_Y);
            sqlStr.Append(", " + WorkingFaceDbConstNamesNew.COORDINATE_Z);
            sqlStr.Append(", " + WorkingFaceDbConstNamesNew.BID);
            sqlStr.Append(" )");
            sqlStr.Append(" VALUES (");
            sqlStr.Append("  '" + workingFaceEntity.WorkingFaceName + "'");
            sqlStr.Append(", '" + workingFaceEntity.MiningareaId + "'");
            sqlStr.Append(", '" + workingFaceEntity.CoordinateX + "'");
            sqlStr.Append(", '" + workingFaceEntity.CoordinateY + "'");
            sqlStr.Append(", '" + workingFaceEntity.CoordinateZ + "'");
            sqlStr.Append(", '" + workingFaceEntity.BID + "'");
            sqlStr.Append(" )");

            ManageDataBase db      = new ManageDataBase(DATABASE_TYPE.GeologyMeasureDB);
            bool           bResult = db.OperateDB(sqlStr.ToString());

            return(bResult);
        }
Exemple #2
0
        /// <summary>
        /// <工作面>信息修改
        /// </summary>
        /// <param name="workingFaceEntity"><工作面>实体</param>
        /// <returns>成功与否:true,false</returns>
        public static bool updateWorkingFaceInfo(WorkingFaceEntityNew workingFaceEntity)
        {
            StringBuilder sqlStr = new StringBuilder();

            sqlStr.Append("UPDATE " + WorkingFaceDbConstNamesNew.TABLE_NAME);
            sqlStr.Append(" SET");
            sqlStr.Append("  " + WorkingFaceDbConstNamesNew.WORKINGFACE_NAME + " = '" + workingFaceEntity.WorkingFaceName + "'");
            sqlStr.Append(", " + WorkingFaceDbConstNamesNew.MININGAREA_ID + " = '" + workingFaceEntity.MiningareaId + "'");
            sqlStr.Append(" WHERE " + WorkingFaceDbConstNamesNew.WORKINGFACE_ID + " = " + workingFaceEntity.WorkingfaceId);
            sqlStr.Append(" WHERE " + WorkingFaceDbConstNamesNew.COORDINATE_X + " = " + workingFaceEntity.CoordinateX);
            sqlStr.Append(" WHERE " + WorkingFaceDbConstNamesNew.COORDINATE_Y + " = " + workingFaceEntity.CoordinateY);
            sqlStr.Append(" WHERE " + WorkingFaceDbConstNamesNew.COORDINATE_Z + " = " + workingFaceEntity.CoordinateZ);
            sqlStr.Append(" WHERE " + WorkingFaceDbConstNamesNew.BID + " = " + workingFaceEntity.BID);

            ManageDataBase db      = new ManageDataBase(DATABASE_TYPE.GeologyMeasureDB);
            bool           bResult = db.OperateDB(sqlStr.ToString());

            return(bResult);
        }