コード例 #1
0
        public static int DelteAlbumPhoto(ClsDeletePhotoInput photo)
        {
            int result = 0;

            MySqlParameter[] parameterList = new MySqlParameter[3];

            parameterList[0] = new MySqlParameter("?PhotoId", photo.photoId);
            parameterList[1] = new MySqlParameter("?AlbumId", photo.albumId);
            parameterList[2] = new MySqlParameter("?DeletedBy", photo.deletedBy);

            try
            {
                result = MySqlHelper.ExecuteNonQuery(GlobalVar.strAppConn, CommandType.StoredProcedure, "V4_1_USPDeleteAlbumPhoto", parameterList);
            }
            catch
            {
                throw;
            }

            return(result);
        }
コード例 #2
0
        public object DeleteAlbumPhoto(ClsDeletePhotoInput deletePhoto)
        {
            dynamic TBDelteAlbumPhoto;

            try
            {
                int result = Gallery.DelteAlbumPhoto(deletePhoto);

                if (result > 0)
                {
                    TBDelteAlbumPhoto = new { status = "0", message = "success" };
                }
                else
                {
                    TBDelteAlbumPhoto = new { status = "1", message = "failed" };
                }
            }
            catch
            {
                TBDelteAlbumPhoto = new { status = "1", message = "failed" };
            }

            return(new { TBDelteAlbumPhoto });
        }