public static int DeleteData(HttpFile httpFile) { if (httpFile.FileOID == null) { throw new Exception("파일을 삭제할 수 없습니다."); } int retValue = 0; httpFile.DeleteUs = 1;// HttpContext.Current.Session["UserOID"].ToString(); HttpFile _file = SelFile(httpFile); SemsValut.FileDelete(_file); DaoFactory.SetUpdate("Comm.DelFile", httpFile); return(retValue); }
public static bool InsertData(IObjectFile @object) { try { if (@object == null) { return(true); } @object.Files.ForEach(item => { HttpFile file = null; try { file = SemsValut.SaveFile(@object, item); file.CreateUs = 1; //HttpContext.Current.Session["UserOID"].ToString(); DaoFactory.SetInsert("Comm.InsFile", file); } catch (Exception ex) { if (item != null) { SemsValut.FileDelete(file); } throw ex; } }); return(false); } catch (Exception ex) { throw ex; } }