public void Refresh(DateTime start, DateTime end, Shop shop, Liquidate liquidate) { // 1, pay, 4 doneprepay, 3, cancel, 6, canceldoneprepay var sql = string.Format( @"select isnull((select sum(amount) from deallogs where shopId = @shopId and state <> 3 and (dealtype = 1 or dealType = 4) and submittime >= @start and submittime < @end), 0.0) as dealAmount, isnull((select sum(amount) from deallogs where shopId = @shopId and state <> 3 and (dealtype = 2 or dealType = 6) and submittime >= @start and submittime < @end), 0.0) as cancelAmount; " ); var list = _databaseInstance.Query <ShopDealLogItem>(sql, new { start = start, end = end, shopId = shop.ShopId }); ShopDealLogItem item = list.FirstOrDefault(); if (item != null) { liquidate.CancelAmount = item.CancelAmount; liquidate.DealAmount = item.DealAmount; } liquidate.SubmitTime = DateTime.Now; }
public void OnReceiveLiquidate(object sender, Liquidate e) { EnCash++; OrderType = e.EnCash.SlbyTP.Equals("1") ? "201" : "301"; }
public void Delete(Liquidate item) { _databaseInstance.Delete(item, TableName); }
public void Insert(Liquidate liquidate) { liquidate.LiquidateId = _databaseInstance.Insert(liquidate, TableName); }
public void Update(Liquidate liquidate) { _databaseInstance.Update(liquidate, TableName); }
protected void SetInnerObject(Liquidate item) { _innerObject = item; }
public ShopDealLogModelBase(Liquidate shop) { _innerObject = shop; }
public ShopDealLogModelBase() { _innerObject = new Liquidate(); }
public ListLiquidate(Liquidate innerObject) { _innerObject = innerObject; }
public ListLiquidate() { _innerObject = new Liquidate(); }