Esempio n. 1
0
 public void UploadSuccessReward(Guid fileId,int reqId)
 {
     DocService ds = Context.GetService<DocService>();
     U_UserInfo u = base.GetUser();
     DDocInfo doc = ds.DDocInfoBll.GetByFileId(fileId);
     //更新悬赏列表的加入文档数量
     TReqDoc trdoc = ds.TReqDocBll.Get(reqId);
     trdoc.DocCount += 1;
     ds.TReqDocBll.Update(trdoc);
     //新增到加入列表
     TJoinDoc jd = new TJoinDoc() {
         DocId = doc.DocId,
         TId = reqId,
         Title = doc.Title,
         UserId = u.UserId,
         IsWin = false
     };
     ds.TJoinDocBll.Insert(jd);
     //转至我的投稿页面
     AddSuccess("投稿成功");
     Redirect("/my/MyContribute.do");
 }
Esempio n. 2
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="obj"></param>
 /// <returns>返回:ture 成功,false 失败</returns>
 public bool Update(TJoinDoc obj)
 {
     return dal.Update(obj);
 }
Esempio n. 3
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="obj"></param>
 /// <returns>返回:ture 成功,false 失败</returns>
 public bool Update(TJoinDoc obj)
 {
     if (obj == null) throw new ArgumentNullException("obj");
     String stmtId = "TJoinDoc.Update";
     int result = SqlMapper.Instance().QueryForObject<int>(stmtId, obj);
     return result > 0 ? true : false;
 }
Esempio n. 4
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <param name="obj">对象</param>
 /// <returns>返回:该条数据的主键Id</returns>
 public int Insert(TJoinDoc obj)
 {
     return dal.Insert(obj);
 }
Esempio n. 5
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <param name="obj">对象</param>
 /// <returns>返回:该条数据的主键Id</returns>
 public int Insert(TJoinDoc obj)
 {
     if (obj == null) throw new ArgumentNullException("obj");
     String stmtId = "TJoinDoc.Insert";
     return SqlMapper.Instance().QueryForObject<int>(stmtId, obj);
 }