public int GetOrderSnIncreasingNumber(int companyId, string storeId, string machineSn)
        {
            IEFRepository <IncreasingNumber> repository = new IncreasingNumberRepository();
            IncreasingNumber number = repository.Get(GettOrderSnIncreasingNumberKey(companyId, storeId, machineSn));

            return(number.Number);
        }
        public void SaveOrderSnIncreasingNumber(int companyId, string storeId, string machineSn, int num)
        {
            IEFRepository <IncreasingNumber> repository = new IncreasingNumberRepository();
            string           id     = GettOrderSnIncreasingNumberKey(companyId, storeId, machineSn);
            IncreasingNumber number = repository.Get(id);

            if (number != null)
            {
                number.Number = num;
            }
            else
            {
                repository.Create(new IncreasingNumber()
                {
                    Number = num, Id = id
                });
            }
            repository.SaveChanges();
        }