Example #1
0
        public GetJobCardEntryReportQM GetJobCardEntryReport(string WoNumber, string WoSerial)
        {
            var model = new GetJobCardEntryReportQM();

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

                var command = new JobCardEntryReportSelectCommand {
                    Connection = connection
                };
                model = command.Execute(WoNumber, WoSerial);
            }

            return(model);
        }
Example #2
0
        public GetJobCardEntryReportQM Execute(String WorkOrderNumber, string WoSerial)
        {
            var response = new GetJobCardEntryReportQM();

            using (var sqlCommand = CreateCommand())
            {
                sqlCommand.Connection  = Connection;
                sqlCommand.CommandText = "[dbo].[uspGetJobCardEntryReport]";
                sqlCommand.CommandType = CommandType.StoredProcedure;

                sqlCommand.Parameters.Add(AddParameter("@WONumber", SsDbType.VarChar, ParameterDirection.Input, WorkOrderNumber));
                sqlCommand.Parameters.Add(AddParameter("@WOSerial", SsDbType.VarChar, ParameterDirection.Input, WoSerial));

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

            return(response);
        }