public string getAddrNameById(string ProvinceID, string CityID, string CountyID) { string addrStr = ""; Common.ZoneSelectDAL zone = new Tz888.SQLServerDAL.Common.ZoneSelectDAL(); addrStr = zone.GetProvinceNameByCode(CountyID) + " "; addrStr += zone.GetCityNameByCode(CityID) + " "; addrStr += zone.GetCountyNameByCode(CountyID); return(addrStr.Trim()); }
///<summary> ///获取对象,获取地址 ///design by ww ///2009-05-06 ///</summary> public Tz888.Model.TPVideo GetVideoModelByID(long InfoID) { Tz888.Model.TPVideo tpVideo = new Tz888.Model.TPVideo(); string strsql = "select * from VideoInfoVIW where InfoID=" + InfoID.ToString(); DataSet ds = DBUtility.DbHelperSQL.Query(strsql); if (ds != null && ds.Tables != null && ds.Tables.Count > 0 && ds.Tables[0] != null) { Common.ZoneSelectDAL zone = new Tz888.SQLServerDAL.Common.ZoneSelectDAL(); tpVideo.AuditingRemark = ds.Tables[0].Rows[0]["AuditingRemark"].ToString(); tpVideo.AuditingStatus = Convert.ToInt32(ds.Tables[0].Rows[0]["AuditingStatus"].ToString()); tpVideo.Author = ds.Tables[0].Rows[0]["Author"].ToString(); if (tpVideo.CityID.Trim() == "") { tpVideo.CityID = ""; } else { tpVideo.CityID = zone.GetCityNameByCode(ds.Tables[0].Rows[0]["CityID"].ToString()); } tpVideo.Content = ds.Tables[0].Rows[0]["Content"].ToString(); if (tpVideo.CountyID.Trim() == "") { tpVideo.CountyID = ""; } else { tpVideo.CountyID = zone.GetCountyNameByCode(ds.Tables[0].Rows[0]["CountyID"].ToString()); } tpVideo.Createby = ds.Tables[0].Rows[0]["Createby"].ToString(); tpVideo.Created = Convert.ToDateTime(ds.Tables[0].Rows[0]["Created"].ToString()); tpVideo.Descript = ds.Tables[0].Rows[0]["Summary"].ToString(); tpVideo.Hit = Convert.ToInt64(ds.Tables[0].Rows[0]["Hit"].ToString()); tpVideo.HtmlURL = ds.Tables[0].Rows[0]["HtmlURL"].ToString(); tpVideo.InfoCode = ds.Tables[0].Rows[0]["InfoCode"].ToString(); tpVideo.infoID = Convert.ToInt64(ds.Tables[0].Rows[0]["infoID"].ToString()); tpVideo.infotypeID = ds.Tables[0].Rows[0]["infotypeID"].ToString(); tpVideo.IsCore = Convert.ToInt32(ds.Tables[0].Rows[0]["IsCore"].ToString()); tpVideo.IsRedirect = Convert.ToInt32(ds.Tables[0].Rows[0]["IsRedirect"].ToString()); tpVideo.KeyWord = ds.Tables[0].Rows[0]["KeyWord"].ToString(); tpVideo.LoginName = ds.Tables[0].Rows[0]["LoginName"].ToString(); tpVideo.MiniatureUrl = ds.Tables[0].Rows[0]["MiniatureUrl"].ToString(); tpVideo.Origin = ds.Tables[0].Rows[0]["Origin"].ToString(); if (tpVideo.ProvinceID.Trim() == "") { tpVideo.ProvinceID = ""; } else { tpVideo.ProvinceID = zone.GetProvinceNameByCode(ds.Tables[0].Rows[0]["ProvinceID"].ToString()); } tpVideo.publishT = Convert.ToDateTime(ds.Tables[0].Rows[0]["publishT"].ToString()); tpVideo.RedirectUrl = ds.Tables[0].Rows[0]["RedirectUrl"].ToString(); tpVideo.strRemark = ds.Tables[0].Rows[0]["Remark"].ToString(); tpVideo.subTitle = ds.Tables[0].Rows[0]["subTitle"].ToString(); tpVideo.Summary = ds.Tables[0].Rows[0]["Summary"].ToString(); tpVideo.Title = ds.Tables[0].Rows[0]["Title"].ToString(); return(tpVideo); } else { return(null); } }