public ActionResult Edit(RefundAmountType obj) { try { NSession.Update(obj); NSession.Flush(); } catch (Exception ee) { return(Json(new { errorMsg = "出错了" })); } return(Json(new { IsSuccess = "true" })); }
/// <summary> /// 根据Id获取 /// </summary> /// <param name="Id"></param> /// <returns></returns> public RefundAmountType GetById(int Id) { RefundAmountType obj = NSession.Get <RefundAmountType>(Id); if (obj == null) { throw new Exception("返回实体为空"); } else { return(obj); } }
public JsonResult DeleteConfirmed(int id) { try { RefundAmountType obj = GetById(id); NSession.Delete(obj); NSession.Flush(); } catch (Exception ee) { return(Json(new { errorMsg = "出错了" })); } return(Json(new { IsSuccess = "true" })); }
public void SaveAmount(DisputeType obj) { RefundAmountType amount = new RefundAmountType { DId = obj.Id, OrderNo = obj.OrderNo, OrderExNo = obj.OrderExNo, Platform = obj.Platform, Account = obj.Account, Amount = obj.Amount, CreateBy = CurrentUser.Realname, CreateOn = DateTime.Now, EmailAccount = obj.EmailAccount, TransactionNo = obj.TransactionNo, Status = "未审核", AmountType = obj.AmountType, AuditOn = Convert.ToDateTime("2000-01-01") }; NSession.Save(amount); NSession.Flush(); }
public JsonResult ToDeal(int id, string audit = "") { try { RefundAmountType obj = GetById(id); if (audit != "n") { obj.Status = "审核通过"; } else { obj.Status = "审核未通过"; } obj.AuditBy = CurrentUser.Realname; obj.AuditOn = DateTime.Now; NSession.Update(obj); NSession.Flush(); } catch (Exception ee) { return(Json(new { IsSuccess = false, ErrorMsg = "出错了" }, JsonRequestBehavior.AllowGet)); } return(Json(new { IsSuccess = true, ErrorMsg = "审核成功" }, JsonRequestBehavior.AllowGet)); }
public ActionResult Edit(int id) { RefundAmountType obj = GetById(id); return(View(obj)); }