public void Ready(int?shopId) { InnerObject = new PosEndPoint { ShopId = (shopId ?? 0) }; var q = ShopService.Query(new ShopRequest()).Select(x => new IdNamePair { Key = x.ShopId, Name = x.DisplayName }); Shop.Bind(q); }
public void Read(int id) { PosEndPoint item = PosEndPointService.GetById(id); if (item != null) { Shop shop = ShopService.GetById(item.ShopId); InnerShop = shop; base.InnerObject = item; } }
public IMessageProvider Save() { var serialNo = SerialNoHelper.Create(); PosEndPoint item = PosEndPointService.GetById(PosEndPointId); if (item != null) { var shop = ShopService.GetById(item.ShopId); item.DisplayName = DisplayName; if (!string.IsNullOrEmpty(DataKey)) { item.DataKey = DataKey; } PosEndPointService.Update(item); AddMessage("success", item.Name); Logger.LogWithSerialNo(LogTypes.PosEdit, serialNo, item.PosEndPointId, item.Name, shop.DisplayName); CacheService.Refresh(CacheKeys.PosKey); } return(this); }
public PosEndPointModelBase() { InnerObject = new PosEndPoint(); }
public ListPosEndPoint(PosEndPoint posEndPoint) { _innerObject = posEndPoint; }
public ListPosEndPoint() { _innerObject = new PosEndPoint(); }
public void Update(PosEndPoint item) { _databaseInstance.Update(item, TableName); }
public void Create(PosEndPoint item) { item.PosEndPointId = _databaseInstance.Insert(item, TableName); }
public void Delete(PosEndPoint item) { _databaseInstance.Delete(item, TableName); }