public List<T_SYS_FILEUPLOAD> Get_ParentID(string parentID) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // if (fileUploadBll.Get_ParentID(parentID) != null) // return fileUploadBll.Get_ParentID(parentID).ToList(); // else // return null; //} fileUploadBll = new FileUploadManagementBll(); if (fileUploadBll.Get_ParentID(parentID) != null) { List<T_SYS_FILEUPLOAD> fs=new List<T_SYS_FILEUPLOAD>(); foreach (var q in fileUploadBll.Get_ParentID(parentID).ToList()) { string uploadFolder = GetUploadFolder(); string fileName= uploadFolder+"\\"+q.FILENAME; string filePath = "http://" + System.Web.HttpContext.Current.Request.Url.Host + System.Web.HttpContext.Current.Request.ApplicationPath +"\\"+ fileName; q.FILENAME = filePath; fs.Add(q); } return fs; } else return null; }
public List <T_SYS_FILEUPLOAD> Get_ParentID(string parentID) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // if (fileUploadBll.Get_ParentID(parentID) != null) // return fileUploadBll.Get_ParentID(parentID).ToList(); // else // return null; //} fileUploadBll = new FileUploadManagementBll(); if (fileUploadBll.Get_ParentID(parentID) != null) { List <T_SYS_FILEUPLOAD> fs = new List <T_SYS_FILEUPLOAD>(); foreach (var q in fileUploadBll.Get_ParentID(parentID).ToList()) { string uploadFolder = GetUploadFolder(); string fileName = uploadFolder + "\\" + q.FILENAME; string filePath = "http://" + System.Web.HttpContext.Current.Request.Url.Host + System.Web.HttpContext.Current.Request.ApplicationPath + "\\" + fileName; q.FILENAME = filePath; fs.Add(q); } return(fs); } else { return(null); } }
public int Delete(T_SYS_FILEUPLOAD obj) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // return fileUploadBll.Del(obj.FILEUPLOADID); //} fileUploadBll = new FileUploadManagementBll(); return(fileUploadBll.Del(obj.FILEUPLOADID)); }
public void Upd(T_SYS_FILEUPLOAD obj) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // fileUploadBll.Update(obj); //} fileUploadBll = new FileUploadManagementBll(); fileUploadBll.Update(obj); }
public int DelTB_ParentID(string[] parentIDs) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // return fileUploadBll.DelTB_ParentID(parentIDs); //} fileUploadBll = new FileUploadManagementBll(); return(fileUploadBll.DelTB_ParentID(parentIDs)); }
public int DelTB(string[] ids) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // return fileUploadBll.DelTB(ids); //} fileUploadBll = new FileUploadManagementBll(); return(fileUploadBll.DelTB(ids)); }
public int Del(string id) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // return fileUploadBll.Del(id); //} fileUploadBll = new FileUploadManagementBll(); return(fileUploadBll.Del(id)); }
public void Del_FileAndID(string fileName, string ID) { using (fileUploadBll = new FileUploadManagementBll()) { string uploadFolder = GetUploadFolder(); if (File.Exists(@HostingEnvironment.ApplicationPhysicalPath + "\\" + uploadFolder + "\\" + fileName)) { File.Delete(@HostingEnvironment.ApplicationPhysicalPath + "\\" + uploadFolder + "\\" + fileName); } fileUploadBll.Del(ID); } }
public void Add(T_SYS_FILEUPLOAD obj) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // bool sucess = fileUploadBll.Add(obj); // if (sucess == false) // throw new Exception("添加数据失败"); //} fileUploadBll = new FileUploadManagementBll(); bool sucess = fileUploadBll.Add(obj); if (sucess == false) throw new Exception("添加数据失败"); }
public void Add(T_SYS_FILEUPLOAD obj) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // bool sucess = fileUploadBll.Add(obj); // if (sucess == false) // throw new Exception("添加数据失败"); //} fileUploadBll = new FileUploadManagementBll(); bool sucess = fileUploadBll.Add(obj); if (sucess == false) { throw new Exception("添加数据失败"); } }
public int Delete(T_SYS_FILEUPLOAD obj) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // return fileUploadBll.Del(obj.FILEUPLOADID); //} fileUploadBll = new FileUploadManagementBll(); return fileUploadBll.Del(obj.FILEUPLOADID); }
public void Del_FileAndID(string fileName, string ID) { using (fileUploadBll = new FileUploadManagementBll()) { string uploadFolder = GetUploadFolder(); if (File.Exists(@HostingEnvironment.ApplicationPhysicalPath + "\\" + uploadFolder + "\\" + fileName)) File.Delete(@HostingEnvironment.ApplicationPhysicalPath + "\\" + uploadFolder + "\\" + fileName); fileUploadBll.Del(ID); } }
public int DelTB_ParentID(string[] parentIDs) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // return fileUploadBll.DelTB_ParentID(parentIDs); //} fileUploadBll = new FileUploadManagementBll(); return fileUploadBll.DelTB_ParentID(parentIDs); }
public int DelTB(string[] ids) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // return fileUploadBll.DelTB(ids); //} fileUploadBll = new FileUploadManagementBll(); return fileUploadBll.DelTB(ids); }
public int Del(string id) { //using (fileUploadBll = new FileUploadManagementBll()) //{ // return fileUploadBll.Del(id); //} fileUploadBll = new FileUploadManagementBll(); return fileUploadBll.Del(id); }