Beispiel #1
0
        private bool ISExitSameRecord(long?accountingUnitID, long?goodsID)
        {
            var query = new DQueryDom(new JoinAlias(typeof(Goods_Accounting_Store)));

            query.Columns.Add(DQSelectColumn.Count());
            query.Where.Conditions.Add(DQCondition.EQ("AccountingUnit_ID", accountingUnitID));
            query.Where.Conditions.Add(DQCondition.EQ("Goods_ID", goodsID));

            using (var session = Dmo.NewSession())
            {
                return(Convert.ToInt32(session.ExecuteScalar(query)) != 0);
            }
        }