日期:2014-05-16 浏览次数:20511 次
string DoSql = "select * from Album where AlbumID='" + Request.QueryString["id"] + "'";
SqlDataReader dr = db.Logins(DoSql);
if (dr.Read())
{
TextAlbum.Text = dr["AlbumName"].ToString();
LbTime.Text = dr["AlbumDate"].ToString();
albumdis.InnerText = dr["AlbumDis"].ToString();
dr.Close();
}
string Exid = "select AlbumPath from Album where AlbumID='" + Request.QueryString["id"] + "'";
string AlbumDir = db.ExecScalar(Exid);
string Albumname = TextAlbum.Text.Trim();
string Spath = Server.MapPath(@AlbumDir);
string Dpath =@"..\images\"+TextAlbum.Text.Trim();
string Dpath1 = Server.MapPath(@Dpath);
if (Directory.Exists(Spath))
{
Directory.Move(Spath, Dpath1);
DirectoryInfo Dirinfo=new DirectoryInfo(Spath);
DateTime dt = Dirinfo.CreationTime;
string Upsql = "update Album set AlbumName='"+ TextAlbum.Text.Trim() +"',AlbumPath='"+ Dpath +"'";
Common.ShowMsgBox("移动成功", this.Page);
}
if(!page.ispostback)
{
string DoSql = "select * from Album where AlbumID='" + Request.QueryString["id"] + "'";
}