Exemple #1
0
        public GetProcessCardQM GetProcessCard(string vendorCode)
        {
            GetProcessCardQM model = new GetProcessCardQM();

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

                var command = new GetProcessCardSelectCommand {
                    Connection = connection
                };
                model = command.Execute(vendorCode);
            }

            return(model);
        }
Exemple #2
0
        public GetProcessCardQM Execute(string vendorCode)
        {
            var response = new GetProcessCardQM();

            using (var sqlCommand = CreateCommand())
            {
                sqlCommand.Connection  = Connection;
                sqlCommand.CommandText = "[dbo].[uspGetProcessCard]";
                sqlCommand.CommandType = CommandType.StoredProcedure;
                sqlCommand.Parameters.Add(AddParameter("@VendorCode", SsDbType.Decimal, ParameterDirection.Input, vendorCode));
                using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand))
                {
                    response.GetProcessCardDetailsQMModel = reader.ToList <GetProcessCardQMModel>();
                }
            }
            return(response);
        }