//保存 protected void btnSubmit_Click(object sender, EventArgs e) { int bid = MyCommFun.Str2Int(hidid.Value); string[] albumArr = Request.Form.GetValues("hid_photo_name"); string[] remarkArr = Request.Form.GetValues("hid_photo_remark"); pBll.DeleteByBid(bid); if (albumArr != null && albumArr.Length > 0) { if (albumArr.Length > 50) { JscriptMsg("不能上传超过50张相片!", "back", "Error"); return; } Model.wx_xt_photo photo = new Model.wx_xt_photo(); for (int i = 0; i < albumArr.Length; i++) { photo = new Model.wx_xt_photo(); string[] imgArr = albumArr[i].Split('|'); if (imgArr.Length == 3) { photo.bId = bid; photo.pUrl = imgArr[1]; photo.remark = remarkArr[i] == null ? "" : remarkArr[i]; pBll.Add(photo); } } } AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "编辑喜帖的相册,喜帖主键为" + bid); //记录日志 JscriptMsg("编辑喜帖的相册成功!", "xitiePhoto.aspx?id=" + bid, "Success"); }
//保存 protected void btnSubmit_Click(object sender, EventArgs e) { int bid = MyCommFun.Str2Int(hidid.Value); string[] albumArr = Request.Form.GetValues("hid_photo_name"); string[] remarkArr = Request.Form.GetValues("hid_photo_remark"); pBll.DeleteByBid(bid); if (albumArr != null && albumArr.Length > 0) { if (albumArr.Length > 50) { JscriptMsg("不能上传超过50张相片!", "back", "Error"); return; } Model.wx_xt_photo photo = new Model.wx_xt_photo(); for (int i = 0; i < albumArr.Length; i++) { photo = new Model.wx_xt_photo(); string[] imgArr = albumArr[i].Split('|'); if (imgArr.Length ==3) { photo.bId = bid; photo.pUrl = imgArr[1]; photo.remark = remarkArr[i] == null ? "" : remarkArr[i]; pBll.Add(photo); } } } AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "编辑喜帖的相册,喜帖主键为" + bid); //记录日志 JscriptMsg("编辑喜帖的相册成功!", "xitiePhoto.aspx?id="+bid, "Success"); }