综合实训报告测试版(11)

时间:2025-02-24

s TIME,count(*) as COUNT from PHOTO_PHOTOS group by

convert(varchar(4),datepart(yy,SCREENDATE)),convert(varchar(4),datepart(mm,SCREENDATE)) order by TIME desc";

DataSet ds = DataAccess.ExecuteToDataSet(PhotoStaticStr); return ds; }

public static DataSet getAllAlbums() {

string PhotoStaticStr = "select albumname from PHOTO_ALBUMS order by BUILDDATE desc"; DataSet ds = DataAccess.ExecuteToDataSet(PhotoStaticStr); return ds; }

public static bool deletePhoto(string photoId) {

string deleteStr = "delete from PHOTO_PHOTOS where PHOTOID=" + photoId; TransHelper trans = new TransHelper(); trans.AddCommand(deleteStr, null, null); bool result = trans.Execute(); return result; }

private static String SQL_PHOTO_BY_PHOTOID = @"select distinct PHOTONAME, DESCRIPTION from PHOTO_PHOTOS where PHOTOID=@PHOTOID ";

public static Dictionary<String, String> getphoto(string photoId) {

return DataAccess.ExecuteToSet(SQL_PHOTO_BY_PHOTOID, "PHOTOID", photoId); }

private static string updatephoto = "update PHOTO_PHOTOS set PHOTONAME=@PHOTONAME,DESCRIPTION=@DESCRIPTION where PHOTOID=@PHOTOID"; public static bool updatePhoto(Dictionary<string, string> PhotoInfo) {

bool result = DataAccess.ExecuteNonQuery(updatephoto, PhotoInfo); return result; }

public static string GetAlbumid(string albumname) {

String SQL_ALBUMID_BY_ALBUMNAME = "select ALBUMID from PHOTO_ALBUMS where ALBUMNAME='" + albumname + "'";

object albumid = DataAccess.ExecuteScalar(SQL_ALBUMID_BY_ALBUMNAME);

if (albumid == null) {

return ((string)albumid); }

综合实训报告测试版(11).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219