/// <summary> /// 退款 /// </summary> /// <param name="grantlist"></param> /// <param name="Amout"></param> /// <param name="EndTime"></param> /// <param name="model"></param> /// <returns></returns> public static bool RefundCardAmout(ParkGrant grantmodel, DateTime EndTime, ParkOrder model) { if (grantmodel == null || model == null) { throw new ArgumentNullException("models"); } model.RecordID = GuidGenerator.GetGuidString(); IParkGrant factory = ParkGrantFactory.GetFactory(); List <ParkGrant> list = new List <ParkGrant>(); if (grantmodel.PKLot == null || grantmodel.PKLot.Trim() == "") { list.Add(grantmodel); } else { string mesg = ""; list = factory.GetCardgrantsByLot(grantmodel.PKID, grantmodel.PKLot, out mesg); } bool result = factory.RefundCardAmout(list, EndTime, model); if (result) { foreach (var item in list) { OperateLogServices.AddOperateLog <ParkGrant>(item, OperateType.Update); } OperateLogServices.AddOperateLog <ParkOrder>(model, OperateType.Add); } return(result); }
public static List <ParkGrant> GetCardgrantsByLot(string parkingID, string lot, out string ErrorMessage) { if (parkingID.IsEmpty()) { throw new ArgumentNullException("parkingID"); } if (lot.IsEmpty()) { throw new ArgumentNullException("lot"); } IParkGrant factory = ParkGrantFactory.GetFactory(); return(factory.GetCardgrantsByLot(parkingID, lot, out ErrorMessage)); }