public GetScReceivingDetailsAndSerialsQM GetScReceivingDetailAndSerials(Int64 VendorCode, string DcNumber)
        {
            var model = new GetScReceivingDetailsAndSerialsQM();

            using (var connection = new DbConnectionProvider().CreateConnection())
            {
                connection.Open();

                var command = new GetScReceivingDetailsAndSerialSelectCommand {
                    Connection = connection
                };
                model = command.Execute(VendorCode, DcNumber);
            }

            return(model);
        }
        public GetScReceivingDetailsAndSerialsQM Execute(long vendorCode, string DcNumber)
        {
            var response = new GetScReceivingDetailsAndSerialsQM();

            using (var sqlCommand = CreateCommand())
            {
                sqlCommand.Connection  = Connection;
                sqlCommand.CommandText = "[dbo].[uspGetScReceivingDetailAndSerials]";
                sqlCommand.CommandType = CommandType.StoredProcedure;
                sqlCommand.Parameters.Add(AddParameter("@VendorCode", SsDbType.BigInt, ParameterDirection.Input, vendorCode));
                sqlCommand.Parameters.Add(AddParameter("@ReceivingDCNumber", SsDbType.VarChar, ParameterDirection.Input, DcNumber));

                using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand))
                {
                    response.getScReceivingDetailsAndSerialsModel = reader.ToList <GetScReceivingDetailsAndSerialsModel>();
                }
            }
            return(response);
        }