예제 #1
0
        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);
        }
예제 #2
0
        public void Read(int id)
        {
            PosEndPoint item = PosEndPointService.GetById(id);

            if (item != null)
            {
                Shop shop = ShopService.GetById(item.ShopId);
                InnerShop        = shop;
                base.InnerObject = item;
            }
        }
예제 #3
0
        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);
        }
예제 #4
0
 public PosEndPointModelBase()
 {
     InnerObject = new PosEndPoint();
 }
예제 #5
0
 public ListPosEndPoint(PosEndPoint posEndPoint)
 {
     _innerObject = posEndPoint;
 }
예제 #6
0
 public ListPosEndPoint()
 {
     _innerObject = new PosEndPoint();
 }
예제 #7
0
 public void Update(PosEndPoint item)
 {
     _databaseInstance.Update(item, TableName);
 }
예제 #8
0
 public void Create(PosEndPoint item)
 {
     item.PosEndPointId = _databaseInstance.Insert(item, TableName);
 }
예제 #9
0
 public void Delete(PosEndPoint item)
 {
     _databaseInstance.Delete(item, TableName);
 }