/// <summary> /// update /// </summary> /// <param name="fqinfo"></param> /// <returns></returns> public bool UpdateFQPayment(FQPayment fqinfo) { if (fqinfo == null) { return(false); } FQPayment fq = context.FQPayment.FirstOrDefault((FQPayment m) => m.Id == fqinfo.Id); if (fq == null) { return(false); } int i = 0; fq.orderId = fqinfo.orderId; fq.TolPrice = fqinfo.TolPrice; fq.RealPrice = fqinfo.RealPrice; fq.LeftPrice = fqinfo.LeftPrice; fq.MemberId = fqinfo.MemberId; fq.PayTime = fqinfo.PayTime; fq.Status = fqinfo.Status; i = context.SaveChanges(); if (i > 0) { return(true); } else { return(false); } }
public FQPayment GetFQPaymentInfo(long orderId, long uid) { FQPayment fpinfo = new FQPayment(); fpinfo = ( from p in context.FQPayment where p.orderId.Equals(orderId) && p.MemberId.Equals(uid) select p).FirstOrDefault(); return(fpinfo); }
public JsonResult GetPayInfo(string orderId = "", string uid = "") { FQPayment fq = ServiceHelper.Create <IFQPaymentService>().GetFQPaymentInfo(long.Parse(orderId), long.Parse(uid)); if (fq == null) { return(Json("")); } else { return(Json(fq)); } }
/// <summary> /// add /// </summary> /// <param name="fqinfo"></param> /// <returns></returns> public bool AddFQPayment(FQPayment fqinfo) { int i = 0; if (fqinfo == null || fqinfo.Id != 0) { return(false); } context.FQPayment.Add(fqinfo); i = context.SaveChanges(); if (i > 0) { return(true); } else { return(false); } }