public static int TagInfoUpdate(TagInfoEntity tagInfoEntity) { tagInfoEntity.LogMessages.MsgType = MessageType.INFO; tagInfoEntity.LogMessages.Content = _nameSpaceClass + "TagInfoUpdate"; LoggerHelper.LogWriter(tagInfoEntity.LogMessages); try { return TagInfoDA.TagInfoUpdate(tagInfoEntity); } catch (Exception ex) { tagInfoEntity.LogMessages.MsgType = MessageType.ERROR; tagInfoEntity.LogMessages.Content = _nameSpaceClass + "TagInfoUpdate Error: " + ex.Message; LoggerHelper.LogWriter(tagInfoEntity.LogMessages); throw ex; } }
public static int TagInfoInsert(TagInfoEntity tagInfoEntity) { OracleParameter[] parm ={ new OracleParameter("TAGNAME",OracleType.VarChar), new OracleParameter("LONGITUDE",OracleType.VarChar), new OracleParameter("LATITUDE",OracleType.VarChar), new OracleParameter("TYPEID",OracleType.VarChar), new OracleParameter("STATUS",OracleType.VarChar), new OracleParameter("CITYID",OracleType.VarChar), new OracleParameter("CITYNAME",OracleType.VarChar), new OracleParameter("PINYINLONG",OracleType.VarChar), new OracleParameter("PINYINSHORT",OracleType.VarChar) }; if (string.IsNullOrEmpty(tagInfoEntity.TagName)) { parm[0].Value = DBNull.Value; } else { parm[0].Value = tagInfoEntity.TagName; } if (string.IsNullOrEmpty(tagInfoEntity.Longitude)) { parm[1].Value = DBNull.Value; } else { parm[1].Value = tagInfoEntity.Longitude; } if (string.IsNullOrEmpty(tagInfoEntity.Latitude)) { parm[2].Value = DBNull.Value; } else { parm[2].Value = tagInfoEntity.Latitude; } if (string.IsNullOrEmpty(tagInfoEntity.TypeID)) { parm[3].Value = DBNull.Value; } else { parm[3].Value = tagInfoEntity.TypeID; } if (string.IsNullOrEmpty(tagInfoEntity.Status)) { parm[4].Value = DBNull.Value; } else { parm[4].Value = tagInfoEntity.Status; } if (string.IsNullOrEmpty(tagInfoEntity.CityID)) { parm[5].Value = DBNull.Value; } else { parm[5].Value = tagInfoEntity.CityID; } if (string.IsNullOrEmpty(tagInfoEntity.CityName)) { parm[6].Value = DBNull.Value; } else { parm[6].Value = tagInfoEntity.CityName; } if (string.IsNullOrEmpty(tagInfoEntity.PinyinLong)) { parm[7].Value = DBNull.Value; } else { parm[7].Value = tagInfoEntity.PinyinLong; } if (string.IsNullOrEmpty(tagInfoEntity.PinyinShort)) { parm[8].Value = DBNull.Value; } else { parm[8].Value = tagInfoEntity.PinyinShort; } int i = DbManager.ExecuteSql("TagInfo", "t_tag_info_insert", parm); return i; }
public static TagInfoEntity TagInfoSearchCount(TagInfoEntity tagInfoEntity) { OracleParameter[] parm ={ new OracleParameter("CITYID",OracleType.VarChar), new OracleParameter("TAGNAME",OracleType.VarChar) }; if (string.IsNullOrEmpty(tagInfoEntity.CityID)) { parm[0].Value = DBNull.Value; } else { parm[0].Value = tagInfoEntity.CityID; } if (string.IsNullOrEmpty(tagInfoEntity.TagName)) { parm[1].Value = DBNull.Value; } else { parm[1].Value = tagInfoEntity.TagName; } DataSet dsResult = DbManager.Query("TagInfo", "t_tag_info_search_count", true, parm); tagInfoEntity.QueryResult = dsResult; return tagInfoEntity; }
public static TagInfoEntity TagInfoSearch(TagInfoEntity tagInfoEntity) { OracleParameter[] parm ={ new OracleParameter("CITYID",OracleType.VarChar), new OracleParameter("TAGNAME",OracleType.VarChar) }; if (string.IsNullOrEmpty(tagInfoEntity.CityID)) { parm[0].Value = DBNull.Value; } else { parm[0].Value = tagInfoEntity.CityID; } if (string.IsNullOrEmpty(tagInfoEntity.TagName)) { parm[1].Value = DBNull.Value; } else { parm[1].Value = tagInfoEntity.TagName; } string SqlString = XmlSqlAnalyze.GotSqlTextFromXml("TagInfo", "t_tag_info_search"); DataSet dsResult = DbManager.Query(SqlString, parm, (tagInfoEntity.PageCurrent - 1) * tagInfoEntity.PageSize, tagInfoEntity.PageSize, true); tagInfoEntity.QueryResult = dsResult; return tagInfoEntity; }