public NDbResult ChangeShift([FromBody] TSBShift value) { NDbResult result; if (null == value) { result = new NDbResult <Shift>(); result.ParameterIsNull(); } else { result = TSBShift.ChangeShift(value); if (!result.errors.hasError) { var plaza = ConfigManager.Instance.Plaza; if (null != plaza) { var taApp = plaza.TAApp; var todApp = plaza.TODApp; if (null != taApp && null != taApp.Http) { var http = taApp.Http; NRestClient.WebProtocol protocol = (http.Protocol == "http") ? NRestClient.WebProtocol.http : NRestClient.WebProtocol.https; string hostName = http.HostName; int portNo = http.PortNumber; var client = new NRestClient(protocol, hostName, portNo); if (null != client) { client.Execute2 <NRestResult>(RouteConsts.Notify.ShiftChanged.Url, new { }); } } if (null != todApp && null != todApp.Http) { var http = todApp.Http; NRestClient.WebProtocol protocol = (http.Protocol == "http") ? NRestClient.WebProtocol.http : NRestClient.WebProtocol.https; string hostName = http.HostName; int portNo = http.PortNumber; var client = new NRestClient(protocol, hostName, portNo); if (null != client) { client.Execute2 <NRestResult>(RouteConsts.Notify.ShiftChanged.Url, new { }); } } } } } return(result); }
public NDbResult <List <LaneAttendance> > GetAttendancesByRevenue([FromBody] RevenueEntry value) { NDbResult <List <LaneAttendance> > result; if (null == value) { result = new NDbResult <List <LaneAttendance> >(); result.ParameterIsNull(); } else { result = LaneAttendance.Search(value); } return(result); }
public NDbResult <TSBShift> Create([FromBody] TSBShiftCreate value) { NDbResult <TSBShift> result; if (null == value) { result = new NDbResult <TSBShift>(); result.ParameterIsNull(); } else { result = TSBShift.Create(value.Shift, value.User); } return(result); }
public NDbResult <User> GetById([FromBody] Search.Users.ById value) { NDbResult <User> result; if (null == value) { result = new NDbResult <User>(); result.ParameterIsNull(); } else { result = Models.User.GetUser(value.UserId); } return(result); }
public NDbResult <Role> GetRole([FromBody] Search.Roles.ById value) { NDbResult <Role> result; if (null == value) { result = new NDbResult <Role>(); result.ParameterIsNull(); } else { result = Role.GetRole(value.RoleId); } return(result); }
public NDbResult <List <User> > SearchById([FromBody] Search.Users.ById value) { NDbResult <List <User> > result; if (null == value) { result = new NDbResult <List <User> >(); result.ParameterIsNull(); } else { result = Models.User.SearchById(value.UserId, value.Roles); } return(result); }
public NDbResult <Lane> SaveLane([FromBody] Lane value) { NDbResult <Lane> result; if (null == value) { result = new NDbResult <Lane>(); result.ParameterIsNull(); } else { result = Lane.Save(value); } return(result); }
public NDbResult <Lane> GetPlazaLane([FromBody] Search.Plaza.LaneByNo value) { NDbResult <Lane> result; if (null == value) { result = new NDbResult <Lane>(); result.ParameterIsNull(); } else { result = Lane.GetPlazaLane(value.PlazaId, value.LaneNo); } return(result); }
public NDbResult SaveAttendances([FromBody] List <LaneAttendance> values) { NDbResult result; if (null == values) { result = new NDbResult(); result.ParameterIsNull(); } else { result = LaneAttendance.SaveLaneAttendances(values); } return(result); }
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 <LaneAttendance> Create([FromBody] LaneAttendanceCreate value) { NDbResult <LaneAttendance> result; if (null == value) { result = new NDbResult <LaneAttendance>(); result.ParameterIsNull(); } else { result = LaneAttendance.Create(value.Lane, value.User); } return(result); }
public NDbResult <List <LaneAttendance> > GetAllNotHasRevenueEntryByUser([FromBody] User value) { NDbResult <List <LaneAttendance> > result; if (null == value) { result = new NDbResult <List <LaneAttendance> >(); result.ParameterIsNull(); } else { result = LaneAttendance.GetAllNotHasRevenueEntryByUser(value); } return(result); }
public NDbResult <LaneAttendance> GetCurrentAttendancesByLane([FromBody] Search.Lanes.Current.AttendanceByLane value) { NDbResult <LaneAttendance> result; if (null == value) { result = new NDbResult <LaneAttendance>(); result.ParameterIsNull(); } else { result = LaneAttendance.GetCurrentByLane(value.Lane); } return(result); }
public NDbResult <List <LaneAttendance> > GetAllAttendancesByUserShift([FromBody] UserShift value) { NDbResult <List <LaneAttendance> > result; if (null == value) { result = new NDbResult <List <LaneAttendance> >(); result.ParameterIsNull(); } else { result = LaneAttendance.Search(value); } return(result); }
public NDbResult <List <PlazaGroup> > GetTSBPlazaGroups([FromBody] TSB value) { NDbResult <List <PlazaGroup> > result; if (null == value) { result = new NDbResult <List <PlazaGroup> >(); result.ParameterIsNull(); } else { result = PlazaGroup.GetTSBPlazaGroups(value); } return(result); }
public NDbResult <PlazaGroup> SavePlazaGroup([FromBody] PlazaGroup value) { NDbResult <PlazaGroup> result; if (null == value) { result = new NDbResult <PlazaGroup>(); result.ParameterIsNull(); } else { result = PlazaGroup.Save(value); } return(result); }
public NDbResult <List <LaneAttendance> > GetAttendancesByDate([FromBody] Search.Lanes.Attendances.ByDate value) { NDbResult <List <LaneAttendance> > result; if (null == value) { result = new NDbResult <List <LaneAttendance> >(); result.ParameterIsNull(); } else { result = LaneAttendance.Search(value.Date); } return(result); }
public NDbResult <List <Lane> > GetPlazaGroupLanes([FromBody] PlazaGroup value) { NDbResult <List <Lane> > result; if (null == value) { result = new NDbResult <List <Lane> >(); result.ParameterIsNull(); } else { result = Lane.GetPlazaGroupLanes(value); } return(result); }
public NDbResult <UserShiftRevenue> GetRevenueShift([FromBody] Search.Revenues.PlazaShift value) { NDbResult <UserShiftRevenue> result; if (null == value) { result = new NDbResult <UserShiftRevenue>(); result.ParameterIsNull(); } else { result = UserShiftRevenue.GetPlazaRevenue(value.Shift, value.PlazaGroup); } return(result); }
public NDbResult <TSB> SaveTSB([FromBody] TSB value) { NDbResult <TSB> result; if (null == value) { result = new NDbResult <TSB>(); result.ParameterIsNull(); } else { result = TSB.Save(value); } return(result); }
public NDbResult SaveTransactions([FromBody] List <TSBCouponTransaction> values) { NDbResult result; if (null == values) { result = new NDbResult(); result.ParameterIsNull(); } else { result = TSBCouponTransaction.SaveTransactions(values); } return(result); }
public NDbResult <User> SaveUser([FromBody] User value) { NDbResult <User> result; if (null == value) { result = new NDbResult <User>(); result.ParameterIsNull(); } else { result = Models.User.SaveUser(value); } return(result); }
public NDbResult <TSBCouponBalance> GetTSBBalance([FromBody] TSB value) { NDbResult <TSBCouponBalance> result; if (null == value) { result = new NDbResult <TSBCouponBalance>(); result.ParameterIsNull(); } else { result = TSBCouponBalance.GetTSBBalance(value); } return(result); }
public NDbResult <Role> SaveRole([FromBody] Role value) { NDbResult <Role> result; if (null == value) { result = new NDbResult <Role>(); result.ParameterIsNull(); } else { result = Role.Save(value); } return(result); }
public NDbResult <List <TSBCouponSummary> > GetTSBCouponSummaries([FromBody] TSB value) { NDbResult <List <TSBCouponSummary> > result; if (null == value) { result = new NDbResult <List <TSBCouponSummary> >(); result.ParameterIsNull(); } else { result = TSBCouponSummary.GetTSBCouponSummaries(value); } return(result); }
public NDbResult <Shift> SaveShift([FromBody] Shift value) { NDbResult <Shift> result; if (null == value) { result = new NDbResult <Shift>(); result.ParameterIsNull(); } else { result = Shift.Save(value); } return(result); }
public NDbResult <List <TSBCouponTransaction> > GetTSBCouponTransactions([FromBody] TSB value) { NDbResult <List <TSBCouponTransaction> > result; if (null == value) { result = new NDbResult <List <TSBCouponTransaction> >(); result.ParameterIsNull(); } else { result = TSBCouponTransaction.GetTSBCouponTransactions(value); } return(result); }
public NDbResult <Plaza> SavePlaza([FromBody] Plaza value) { NDbResult <Plaza> result; if (null != value) { result = new NDbResult <Plaza>(); result.ParameterIsNull(); } else { result = Plaza.Save(value); } return(result); }
public NDbResult <List <LaneAttendance> > GetAttendancesByUserShift([FromBody] Search.Lanes.Attendances.ByUserShift value) { NDbResult <List <LaneAttendance> > result; if (null == value) { result = new NDbResult <List <LaneAttendance> >(); result.ParameterIsNull(); } else { result = LaneAttendance.Search(value.Shift, value.PlazaGroup, value.RevenueDate); } return(result); }