public void AddJobCardGeneration() { GetJobCardGenerationQM model = new GetJobCardGenerationQM(); using (var connection = new DbConnectionProvider().CreateConnection()) { connection.Open(); var command = new GetJobCardGenerationSelectCommand { Connection = connection }; model = command.Execute(); } }
public GetJobCardGenerationQM Execute() { var response = new GetJobCardGenerationQM(); using (var sqlCommand = CreateCommand()) { sqlCommand.Connection = Connection; sqlCommand.CommandText = "[dbo].[uspGetJobCardMasterAndDetails]"; sqlCommand.CommandType = CommandType.StoredProcedure; //sqlCommand.Parameters.Add(AddParameter("@PartCode", SsDbType.Decimal, ParameterDirection.Input, PartCode)); using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand)) { response.GetJobCardGenerationModelList = reader.ToList <GetJobCardGenerationModel>(); } } return(response); }