示例#1
0
        public int DelAnnex(PrjInfoPhotoModel annexInfo)
        {
            FileUpload upload = new FileUpload();

            if (upload.Delete(annexInfo.PhotoPath + annexInfo.PhotoName))
            {
                return(publicDbOpClass.ExecSqlString("delete from PT_PrjInfo_PhotoList where uid = '" + annexInfo.UID.ToString() + "'"));
            }
            return(0);
        }
示例#2
0
        public bool DelThumbnai(string thumbnaiCode)
        {
            FileUpload upload      = new FileUpload();
            DataTable  table       = publicDbOpClass.DataTableQuary("select * from XPM_Basic_Thumbnai where ThumbnaiCode='" + thumbnaiCode + "'");
            string     strFileName = table.Rows[0]["ThumbnaImgPath"].ToString() + table.Rows[0]["ThumbnaName"].ToString();

            if (upload.Delete(strFileName))
            {
                StringBuilder builder = new StringBuilder();
                builder.Append("delete from XPM_Basic_Thumbnai where ThumbnaiCode = '");
                builder.Append(thumbnaiCode + "'");
                if (publicDbOpClass.ExecSqlString(builder.ToString()) == 1)
                {
                    return(true);
                }
            }
            return(false);
        }