public List <User> GetUsers(Role role) { var ret = NRestClient.Create(port: 9000).Execute <List <User> >( RouteConsts.User.GetUsers.Url, role); return(ret); }
public NRestResult <List <TAServerCouponTransaction> > GetTAServerCouponTransactions( string tsbId, string userId, int?transactionType, int?couponType) { NRestResult <List <TAServerCouponTransaction> > ret; NRestClient client = NRestClient.CreateTAxTODClient(); if (null == client) { ret = new NRestResult <List <TAServerCouponTransaction> >(); ret.RestInvalidConfig(); return(ret); } var url = "api/users/coupons/getlist"; var value = new { tsbid = tsbId, userid = userId, transactiontype = transactionType, coupontype = couponType }; if (null != value) { ret = client.Execute <List <TAServerCouponTransaction> >(url, value); } else { ret = new NRestResult <List <TAServerCouponTransaction> >(); ret.ParameterIsNull(); } return(ret); }
public Role GetRole(Search.Roles.ById value) { var ret = NRestClient.Create(port: 9000).Execute <Role>( RouteConsts.User.GetRole.Url, value); return(ret); }
public NRestResult <UserShift> GetCurrent(User value) { NRestResult <UserShift> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <UserShift>(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <UserShift>( RouteConsts.UserShift.GetCurrent.Url, value); } else { ret = new NRestResult <UserShift>(); ret.ParameterIsNull(); ret.data = null; } return(ret); }
public NRestResult <List <TSBCouponSummary> > GetTSBCouponSummaries(TSB value) { NRestResult <List <TSBCouponSummary> > ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <List <TSBCouponSummary> >(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <List <TSBCouponSummary> >( RouteConsts.Coupon.GetTSBCouponSummaries.Url, value); } else { ret = new NRestResult <List <TSBCouponSummary> >(); ret.ParameterIsNull(); ret.data = new List <TSBCouponSummary>(); } return(ret); }
public NRestResult <LanePayment> GetCurrentPaymentsByLane( Search.Lanes.Current.PaymentByLane 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.GetCurrentPaymentsByLane.Url, value); } else { ret = new NRestResult <LanePayment>(); ret.ParameterIsNull(); } return(ret); }
public List <UserShift> GetUserShifts(User collector) { var ret = NRestClient.Create(port: 9000).Execute <List <UserShift> >( RouteConsts.Job.GetUserShifts.Url, collector); return(ret); }
public NRestResult <LanePayment> CreatePayment(Lane lane, User supervisor, Payment payment, DateTime date, decimal amount) { NRestResult <LanePayment> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <LanePayment>(); ret.RestInvalidConfig(); return(ret); } ret = client.Execute <LanePayment>( RouteConsts.Lane.CreatePayment.Url, new LanePaymentCreate() { Lane = lane, User = supervisor, Payment = payment, Date = date, Amount = amount }); return(ret); }
public NRestResult <List <LanePayment> > GetPaymentsByUserShift( Search.Lanes.Attendances.ByUserShift value) { NRestResult <List <LanePayment> > ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <List <LanePayment> >(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <List <LanePayment> >( RouteConsts.Lane.GetPaymentsByUserShift.Url, value); } else { ret = new NRestResult <List <LanePayment> >(); ret.ParameterIsNull(); } return(ret); }
public NRestResult <List <LaneAttendance> > GetAttendancesByRevenue( RevenueEntry value) { NRestResult <List <LaneAttendance> > ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <List <LaneAttendance> >(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <List <LaneAttendance> >( RouteConsts.Lane.GetAttendancesByRevenue.Url, value); } else { ret = new NRestResult <List <LaneAttendance> >(); ret.ParameterIsNull(); } return(ret); }
public NRestResult <TSBExchangeTransaction> GetTSBExchangeTransaction( Search.Exchanges.Transactions.Filter value) { NRestResult <TSBExchangeTransaction> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <TSBExchangeTransaction>(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <TSBExchangeTransaction>( RouteConsts.Exchange.GetTSBExchangeTransaction.Url, value); } else { ret = new NRestResult <TSBExchangeTransaction>(); ret.ParameterIsNull(); ret.data = null; } return(ret); }
public NRestResult <TSBExchangeGroup> SaveTSBExchangeGroup( TSBExchangeGroup value) { NRestResult <TSBExchangeGroup> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <TSBExchangeGroup>(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <TSBExchangeGroup>( RouteConsts.Exchange.SaveTSBExchangeGroup.Url, value); } else { ret = new NRestResult <TSBExchangeGroup>(); ret.ParameterIsNull(); ret.data = null; } return(ret); }
public NRestResult <TSBCouponBalance> GetTSBBalance(TSB value) { NRestResult <TSBCouponBalance> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <TSBCouponBalance>(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <TSBCouponBalance>( RouteConsts.Coupon.GetTSBBalance.Url, value); } else { ret = new NRestResult <TSBCouponBalance>(); ret.ParameterIsNull(); ret.data = null; } return(ret); }
public List <Role> GetRoles() { var ret = NRestClient.Create(port: 9000).Execute <List <Role> >( RouteConsts.User.GetRoles.Url, new { }); return(ret); }
public NRestResult <TSBCouponTransaction> SaveTransaction(TSBCouponTransaction value) { NRestResult <TSBCouponTransaction> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <TSBCouponTransaction>(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <TSBCouponTransaction>( RouteConsts.Coupon.SaveTSBCouponTransaction.Url, value); } else { ret = new NRestResult <TSBCouponTransaction>(); ret.ParameterIsNull(); ret.data = null; } return(ret); }
public NRestResult <UserCreditBalance> SaveUserCreditBalance(UserCreditBalance value) { NRestResult <UserCreditBalance> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <UserCreditBalance>(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <UserCreditBalance>( RouteConsts.Credit.SaveUserCreditBalance.Url, value); } else { ret = new NRestResult <UserCreditBalance>(); ret.ParameterIsNull(); ret.data = null; } return(ret); }
public User GetById(Search.Users.ById value) { var ret = NRestClient.Create(port: 9000).Execute <User>( RouteConsts.User.GetById.Url, value); return(ret); }
public NRestResult <List <UserCreditBalance> > GetActiveUserCreditBalances(TSB value) { NRestResult <List <UserCreditBalance> > ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <List <UserCreditBalance> >(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <List <UserCreditBalance> >( RouteConsts.Credit.GetActiveUserCreditBalances.Url, value); } else { ret = new NRestResult <List <UserCreditBalance> >(); ret.ParameterIsNull(); ret.data = new List <UserCreditBalance>(); } return(ret); }
public NRestResult <UserCreditBalance> GetNoRevenueEntryUserCreditBalanceById( Search.UserCredits.GetActiveById value) { NRestResult <UserCreditBalance> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <UserCreditBalance>(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <UserCreditBalance>( RouteConsts.Credit.GetNoRevenueEntryUserCreditBalanceById.Url, value); } else { ret = new NRestResult <UserCreditBalance>(); ret.ParameterIsNull(); ret.data = null; } return(ret); }
public List <Lane> GetPlazaLanes(Plaza plaza) { var ret = NRestClient.Create(port: 9000).Execute <List <Lane> >( RouteConsts.TSB.GetPlazaLanes.Url, plaza); return(ret); }
public NRestResult <List <TSBCreditTransaction> > GetReplaceTSBCreditTransaction(DateTime value) { NRestResult <List <TSBCreditTransaction> > ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <List <TSBCreditTransaction> >(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <List <TSBCreditTransaction> >( RouteConsts.Credit.GetReplaceTSBCreditTransaction.Url, value); } else { ret = new NRestResult <List <TSBCreditTransaction> >(); ret.ParameterIsNull(); ret.data = null; } return(ret); }
public List <Lane> GetTSBLanes(TSB tsb) { var ret = NRestClient.Create(port: 9000).Execute <List <Lane> >( RouteConsts.TSB.GetTSBLanes.Url, tsb); return(ret); }
public List <TSB> GetTSBs() { var ret = NRestClient.Create(port: 9000).Execute <List <TSB> >( RouteConsts.TSB.GetTSBs.Url, new { }); return(ret); }
public List <Shift> GetShifts() { var ret = NRestClient.Create(port: 9000).Execute <List <Shift> >( RouteConsts.Shift.GetShifts.Url, new { }); return(ret); }
public List <LaneAttendance> GetAttendancesByUserShift( Search.Lanes.Attendances.ByUserShift value) { var ret = NRestClient.Create(port: 9000).Execute <List <LaneAttendance> >( RouteConsts.Lane.GetAttendancesByUserShift.Url, value); return(ret); }
public List <LanePayment> GetPaymentsByLane( Search.Lanes.Attendances.ByLane value) { var ret = NRestClient.Create(port: 9000).Execute <List <LanePayment> >( RouteConsts.Lane.GetPaymentsByLane.Url, value); return(ret); }
public LaneAttendance GetCurrentAttendancesByLane( Search.Lanes.Current.AttendanceByLane value) { var ret = NRestClient.Create(port: 9000).Execute <LaneAttendance>( RouteConsts.Lane.GetCurrentAttendancesByLane.Url, value); return(ret); }
public LanePayment GetCurrentPaymentsByLane( Search.Lanes.Current.PaymentByLane value) { var ret = NRestClient.Create(port: 9000).Execute <LanePayment>( RouteConsts.Lane.GetCurrentPaymentsByLane.Url, value); return(ret); }
public bool BeginJob(UserShift shift) { if (null == shift) { return(false); } return(NRestClient.Create(port: 9000).Execute <bool>( RouteConsts.Job.BeginJob.Url, shift)); }
public void EndJob(UserShift shift) { if (null == shift) { return; } NRestClient.Create(port: 9000).Execute( RouteConsts.Job.EndJob.Url, shift); }