public List <LanePayment> GetPaymentsByLane([FromBody] Search.Lanes.Payments.ByLane value) { if (null == value) { return(new List <LanePayment>()); } return(LanePayment.Search(value.Lane)); }
public LanePayment GetCurrentPaymentsByLane([FromBody] Search.Lanes.Current.PaymentByLane value) { if (null == value) { return(null); } return(LanePayment.GetCurrentByLane(value.Lane)); }
public List <LanePayment> GetPaymentsByUserShifts([FromBody] Search.Lanes.Payments.ByUserShift value) { if (null == value) { return(new List <LanePayment>()); } return(LanePayment.Search(value.Shift)); }
public LanePayment Create([FromBody] LanePaymentCreate value) { if (null == value) { return(null); } return(LanePayment.Create(value.Lane, value.User, value.Payment, value.Date, value.Amount)); }
public void SavePayment([FromBody] LanePayment value) { if (null == value) { return; } Random rand = new Random(); if (string.IsNullOrWhiteSpace(value.ApproveCode)) { value.ApproveCode = rand.Next(10000000).ToString("D8"); // auto generate. } LanePayment.Save(value); }
public NDbResult <LanePayment> GetCurrentPaymentsByLane([FromBody] Search.Lanes.Current.PaymentByLane value) { NDbResult <LanePayment> result; if (null == value) { result = new NDbResult <LanePayment>(); result.ParameterIsNull(); } else { result = LanePayment.GetCurrentByLane(value.Lane); } return(result); }
public NDbResult <List <LanePayment> > GetPaymentsByLane([FromBody] Search.Lanes.Payments.ByLane value) { NDbResult <List <LanePayment> > result; if (null == value) { result = new NDbResult <List <LanePayment> >(); result.ParameterIsNull(); } else { result = LanePayment.Search(value.Lane); } return(result); }
public NDbResult <LanePayment> Create([FromBody] LanePaymentCreate value) { NDbResult <LanePayment> result; if (null == value) { result = new NDbResult <LanePayment>(); result.ParameterIsNull(); } else { result = LanePayment.Create(value.Lane, value.User, value.Payment, value.Date, value.Amount); } return(result); }
public NDbResult <LanePayment> SavePayment([FromBody] LanePayment value) { NDbResult <LanePayment> result; if (null == value) { result = new NDbResult <LanePayment>(); result.ParameterIsNull(); } else { if (string.IsNullOrWhiteSpace(value.ApproveCode)) { Random rand = new Random(); value.ApproveCode = rand.Next(10000000).ToString("D8"); // auto generate. } result = LanePayment.Save(value); } return(result); }
public NRestResult <LanePayment> SavePayment(LanePayment value) { NRestResult <LanePayment> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <LanePayment>(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <LanePayment>( RouteConsts.Lane.SavePayment.Url, value); } else { ret = new NRestResult <LanePayment>(); ret.ParameterIsNull(); } return(ret); }
public void SavePayment(LanePayment value) { NRestClient.Create(port: 9000).Execute( RouteConsts.Lane.SavePayment.Url, value); }