Пример #1
0
        public IEnumerable <Sgtin> Get(int naklItemId)
        {
            const string commandText = @"Select value From chz_scanned_sgtins
             Where chz_nakl_item_id=@chz_nakl_item_id";

            var parameter = new NaklItemIdParameter()
            {
                Id = naklItemId
            };
            var transaction = Transact <Sgtin> .Create(ConnectionString, commandText, parameter : parameter);

            return(transaction.ExecuteReader());
        }
Пример #2
0
        public int GetNaklAcceptTypeId(int naklItemId)
        {
            const string commandText = @"Select chz_nakls__list_of_accept_type_id
            From chz_nakl_items Inner Join chz_nakls On chz_nakl_items.chz_nakl_id=chz_nakls.chz_nakl_id
            Where chz_nakl_items.chz_nakl_item_id = @chz_nakl_item_id";

            var parameter = new NaklItemIdParameter()
            {
                Id = naklItemId
            };
            var transaction = Transact <object> .Create(ConnectionString, commandText, parameter : parameter);

            return(transaction.ExecuteScalar <int>());
        }
Пример #3
0
        public IEnumerable <SgtinResult> GetStinResult(int naklItemId)
        {
            const string commandText = @"Select chz_sgtins.sgtin As provider_sgtin, chz_scanned_sgtins.value As recesiver_sgtin 
            From chz_sgtins FULL OUTER JOIN chz_scanned_sgtins On chz_sgtins.sgtin=chz_scanned_sgtins.value
            Where chz_sgtins.chz_nakl_item_id = @chz_nakl_item_id Or chz_scanned_sgtins.chz_nakl_item_id = @chz_nakl_item_id";

            var parameter = new NaklItemIdParameter()
            {
                Id = naklItemId
            };
            var transaction = Transact <SgtinResult> .Create(ConnectionString, commandText, parameter : parameter);

            return(transaction.ExecuteReader());
        }