|
|
@ -212,9 +212,12 @@ namespace EasyBL.WEBAPP.SYS |
|
|
|
var sServerPath = c.Server.MapPath("/"); |
|
|
|
var sRoot = sServerPath + "Document\\EurotranFile"; |
|
|
|
Common.FnCreateDir(sRoot + "\\" + sSource);//如果沒有該目錄就創建目錄
|
|
|
|
if (req.Files.Count > 0) |
|
|
|
|
|
|
|
if(req.Files.Count > 0) |
|
|
|
{ |
|
|
|
|
|
|
|
var saFilesAdd = new List<OTB_SYS_Files>(); |
|
|
|
|
|
|
|
for (int index = 0; index < req.Files.Count; index++) |
|
|
|
{ |
|
|
|
var file = req.Files[index]; |
|
|
@ -263,26 +266,31 @@ namespace EasyBL.WEBAPP.SYS |
|
|
|
}; |
|
|
|
saFilesAdd.Add(oFile); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
var db = SugarBase.DB; |
|
|
|
var iRes = db.Insertable(saFilesAdd).ExecuteCommand(); |
|
|
|
|
|
|
|
var userPic = db.Updateable<SETB_CMS_Member>() |
|
|
|
.UpdateColumns(x => new SETB_CMS_Member { MemberPicture = sParentID }) |
|
|
|
.Where(x => x.OrgID == OrgID && x.Account == Account) |
|
|
|
.ExecuteCommand(); |
|
|
|
var db = SugarBase.DB; |
|
|
|
var iRes = db.Insertable(saFilesAdd).ExecuteCommand(); |
|
|
|
|
|
|
|
if (iRes > 0) |
|
|
|
{ |
|
|
|
var rp = c.Response; |
|
|
|
var sJsonText = ServiceBase.JsonToString(saFilesAdd); |
|
|
|
rp.Write(sJsonText); |
|
|
|
rp.End(); |
|
|
|
var userPic = db.Updateable<SETB_CMS_Member>() |
|
|
|
.UpdateColumns(x => new SETB_CMS_Member { MemberPicture = sParentID }) |
|
|
|
.Where(x => x.OrgID == OrgID && x.Account == Account) |
|
|
|
.ExecuteCommand(); |
|
|
|
|
|
|
|
if (iRes > 0) |
|
|
|
{ |
|
|
|
var rp = c.Response; |
|
|
|
var sJsonText = ServiceBase.JsonToString(saFilesAdd); |
|
|
|
rp.Write(sJsonText); |
|
|
|
rp.End(); |
|
|
|
} |
|
|
|
srm = new SuccessResponseMessage(null, null); |
|
|
|
srm.DATA.Add(BLWording.REL, iRes); |
|
|
|
} |
|
|
|
srm = new SuccessResponseMessage(null, null); |
|
|
|
srm.DATA.Add(BLWording.REL, iRes); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|