/// <summary> /// �����ϴ��ļ���Ϣ���������ݿ⣩ /// </summary> /// <param name="id">��ϢId</param> private static void SavaUploadFile(Int64 id) { string DelIDs = XYECOM.Core.XYRequest.GetFormString("_Upload_DelIDs"); string UpIDs = XYECOM.Core.XYRequest.GetFormString("_Upload_UpIDs"); string TableName = XYECOM.Core.XYRequest.GetFormString("_Upload_TabName"); XYECOM.Business.Attachment obj = new XYECOM.Business.Attachment(); //ɾ����Ϣ if ("" != DelIDs) { obj.Delete(DelIDs); //ɾ������ʱͬʱ���¸�����Ӧ����Ϣ�� IsHasImage �ֶε�ֵ //IsHasImage �ֶα�ʾ��Ϣ�Ƿ����ͼƬ if (id > 0) obj.UpdateInfoIsHasImage(TableName, id); } //������Ϣ if ("" != UpIDs) { obj.Update(UpIDs, id); } }
/// <summary> /// ����Ϣ����ͼƬindex /// </summary> /// <param name="tableName">Ŀ�����</param> /// <param name="id">���</param> /// <param name="IsCreateThumbnailImg">�Ƿ�����ͼ</param> private static void UpdateInex(string tableName, Int64 id, bool IsCreateThumbnailImg) { XYECOM.Business.Attachment obj = new XYECOM.Business.Attachment(); XYECOM.Model.AttachmentInfo info = XYECOM.Business.Attachment.GetTop1Info(tableName, id.ToString()); //û������ͼ������Ϣ���˳� if (null == info) return; //�Ѿ���������ͼ���Ƴ� if ("" != info.ThumbnailImg) return; if (IsCreateThumbnailImg) { //��������ͼ CreateThumbnailImgByInfo(info); } info.At_Index = 1; obj.Update(info); }